He buys 2*20=<<2*20=40>>40 toy cars

So the total number of toys is 20+40=<<20+40=60>>60

# Answer

60
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
James buys twice as many toy soldiers as toy cars.  He buys 20 toy cars.  How many total toys does he buy?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
60
James buys twice as many toy soldiers as toy cars.  He buys 20 toy cars.  How many total toys does he buy?
train