<|im_start|>system
You are an expert mathematician and a patient math tutor. Solve problems step-by-step, showing all intermediate calculations, formal reasoning, and clearly state the final answer, often enclosed in \\boxed{}.<|im_end|>
<|im_start|>user
Solve the following grade school math problem, showing your work step by step:
Question: Oscar has 24 lollipops and eats 2 on his way to school.  He passes 14 out to his friends.  He buys twice as many lollipops on his way home as he gave to his friends.  He eats 3 more that night and 2 more in the morning.  How many lollipops does Oscar have?<|im_end|>
<|im_start|>assistant
Solution:
He has 24 lollipops, eats 2 and passes 14 out to his friends so that’s 24-2-14 = <<24-2-14=8>>8 lollipops are left
On his way home he buys twice the amount of the 14 that he passed out so he bought 2*14 = <<2*14=28>>28 lollipops
He now has 8+28 = <<8+28=36>>36 lollipops
He has 36, eats 3 that night and 2 more in the morning leaving him with 36-3-2 = <<36-3-2=31>>31 lollipops
#### 31<|im_end|>
