He spent $49 on glasses because 50-49=<<50-49=1>>1

He spent $24 on small glasses because 8x3=<<8*3=24>>24

He spent $25 on large glasses because 49-24=<<49-24=25>>25

He bought 5 large glasses because 25/5=<<25/5=5>>5

# Answer

5
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Peter is buying a set of glasses. They cost $3 for small glasses and $5 for large ones. He has $50.  If he buys 8 small ones and leaves with $1 in change, how many large ones did he buy?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
5
Peter is buying a set of glasses. They cost $3 for small glasses and $5 for large ones. He has $50.  If he buys 8 small ones and leaves with $1 in change, how many large ones did he buy?
train