You are given a math word problem and you are supposed to apply addition or subtraction mathematical operators on the numbers embedded in the text to answer the following question and then only report the final numerical answer.

Example Input: Gwen had 18 math problems and 11 science problems for homework . If she finished 24 of the problems at school , how many problems did she have to do for homework ?
Example Output: 5

Example Input: There were 39 girls and 4 boys trying out for the schools basketball team . If only 26 of them got called back , how many students did n't make the cut ?
Example Output: 17

Example Input: The school cafeteria ordered 42 red apples and 7 green apples for students lunches . But , if only 9 students wanted fruit , how many extra did the cafeteria end up with ?
Example Output:
40