Detailed Instructions: You are given a math word problem and you are supposed to only use subtraction on the numbers embedded in the text to answer the following question and then only report the final numerical answer.
Q: Context: A chef had 40 apples and 54 peaches. After making some pies, he had 39 apples left.

Question: How many apples did he use?
A:
1