John Smith buys 3 cakes for $12 each and splits the cost with his brother.  How much did he pay? Let's think step by step and output the final answer after "####".
user
The cakes cost 3*12=$<<3*12=36>>36
So he paid 36/2=$<<36/2=18>>18
#### 18
John Smith buys 3 cakes for $12 each and splits the cost with his brother.  How much did he pay?
train