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

### Instruction:
 约翰买了一盒40个灯泡。他用了16个，然后把剩下的一半给了朋友。他还剩下多少个？


### Response:
 他开始有40个，用了一些后剩下40-16 = <<40-16=24>>24个
他给了一些后剩下24-12 = <<24-12=12>>12个