He bought 40/5=<<40/5=8>>8 boxes

He loses an average of 5-3.5=$<<5-3.5=1.50>>1.50 per box

So he loses an average of 1.5*8=$<<1.5*8=12>>12

# Answer

12
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
John buys game loot boxes for $5 each.  The average value of items inside is $3.5.   He spends $40 on loot boxes.  What is the average amount he lost?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
12
John buys game loot boxes for $5 each.  The average value of items inside is $3.5.   He spends $40 on loot boxes.  What is the average amount he lost?
train