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

### Instruction:
 John ananunua kisanduku cha taa 40. Anatumia 16 kati yake na kisha anampa nusu ya iliyobaki rafiki yake. Anabakiwa na wangapi?


### Response:
 Alikuwa na 40-16=<<40-16=24>>24 baada ya kutumia baadhi yake
Alimpa 24/2=<<24/2=12>>12
Hivyo anabakiwa na 24-12=<<24-12=12>>12