The taxes were 40*.05=$<<40*.05=2>>2.
So the price was 40+2=$<<40+2=42>>42.
He got a discount so the price he paid was 42-8=$<<42-8=34>>34.
Since he paid half his price was 34/2=$<<34/2=17>>17.
#### 17