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

### 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:
 หลังจากที่ลูซี่ทำขนมแล้ว เธอเหลือแป้งอยู่ 500 - 240 = <<500-240=260>>260 กรัม
หลังจากที่เทลงมือ เธอเหลือแป้งอยู่ 260 * 0.50 = <<260*0.50=130>>130 กรัม
ลูซี่ต้องการแป้ง 500 - 130 = <<500-130=370>>370 กรัม.