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

### Instruction:
Adam has 18 magnets. He gave away a third of the magnets, and he still had half as many magnets as Peter. How many magnets does Peter have?

### Response:
 Adam alianza na vifaa vya 18.
Adam alitoa vifaa vya tatu, ambavyo ni 18/3 = <<18/3=6>>6.
Kwa hivyo Adam ana vifaa vya 18 - 6 = <<18-6=12>>12 vilivyosalia.
Nusu ya 12 ni 6, kwa hivyo Peter ana vifaa vya 6.