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

### Instruction:
Lucy has been trying new recipes and wants to make sure she keeps the cupboard stocked with ingredients. She had a 500g bag of flour in the cupboard at the start of the week. She used 240g when she baked cookies on Tuesday, and accidentally spilled half of what was left when she was putting the flour away. If Lucy wants a full bag of flour in the cupboard, how much flour does she need to buy, in grams?

### Response:
 Baada ya kupika biskuti, Lucy alikuwa na gramu 500 - 240 = <<500-240=260>>260 za unga zilizobaki.
Alipomwaga nusu yake, alipoteza gramu 260 / 2 = <<260/2=130>>130 za unga.
Hii inamaanisha alikuwa na gramu 260 - 130 = <<260-130=130>>130 za unga zilizobaki.
Kwa kuwa Lucy anataka mfuko kamili wa unga kwenye kabati, anahitaji gramu 500 - 130 = <<500-130=370>>370 za unga.