Below is an instruction that describes a task. Write a response that appropriately completes the request in Thai. Please answer in Thai.

### Instruction:
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?

### Response:
 ให้ x เป็นจำนวนแว่นตาขนาดใหญ่ที่พีเตอร์ซื้อ
3x + 5(8-x) = 50
3x + 40 - 5x = 50
-2x = 10
x = -<<10/-2=5>>5