Bonnie and Samuel went to the market together. Bonnie bought 8 apples. Samuel bought 20 more apples than Bonnie. Samuel then ate half of them and used 1/7 of them to make apple pie. How many apples does Samuel have left? Let's think step by step and output the final answer after "####".
user
Samuel bought 20+8 = <<20+8=28>>28 apples.
Samuel ate 28/2 = <<28/2=14>>14 apples.
Samuel used 28/7 = <<28/7=4>>4 to make apple pie.
Samuel has 28-14-4 = <<28-14-4=10>>10 apples left.
#### 10
Bonnie and Samuel went to the market together. Bonnie bought 8 apples. Samuel bought 20 more apples than Bonnie. Samuel then ate half of them and used 1/7 of them to make apple pie. How many apples does Samuel have left?
train