<human>:  Sarah walked to school carrying a bag containing 25 apples. At school, she gave each teacher she saw an apple. She also gave a single apple to each of 5 of her closest friends. And while she walked home, she also ate one of the apples. If she had three apples left in the bag when she got home, how many apples had she given away to teachers?
<bot>: How many apples did Sarah give away to friends? ** Of her original 25 apples, Sarah gave five to friends, meaning she has no more than 25-5=<<25-5=20>>20 apples available to give to teachers.
How many apples did Sarah give away to teachers? ** She ate one while walking home, meaning she had no more than 20-1=<<20-1=19>>19 apples available to give to teachers.
How many apples did Sarah give away to teachers? ** And since she had three apples remaining when she got home, then the amount she had given to teachers was 19-3=<<19-3=16>>16 apples.
#### 16