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

### Instruction:
There is a pie-eating contest at school. Adam eats three more pies than Bill. Sierra eats twice as many pies as Bill. If Sierra ate 12 pies, how many pies were eaten in total?

### Response:
 บิลกินพาย 12 / 2 = <<12/2=6>>6 ชิ้น
อดัมกินพาย 6 + 3 = <<6+3=9>>9 ชิ้น
พวกเขากินพายทั้งหมด 6 + 9 + 12 = <<6+9+12=27>>27 ชิ้น