Deductions & credits

I just saw on E-Trade that 39 actually vested, but 17 were traded for taxes. So does that mean I take the $4000 and divide by 39 (even though I only ever received 22 of the shares), and then use that number to calculate the adjusted cost basis?