Given a math word problem, answer the following question. You might need to apply addition or subtraction mathematical operators on the numbers embedded in the text to answer the question and then only report the final numerical answer.

Example Input: after a week sofia did a survey to ask if the students liked the new menu . she found out that 235 students liked the new menu while 165 did n't . how many students took part in sofia 's survey ?
Example Output: 400

Example Input: angela won a contest . she gets $ 90 to spend at puzzle palace . she bought many wonderful puzzles . she had $ 12 left . how much did she spend ?
Example Output: 78

Example Input: he also needed some nails . if he already has 247 nails with him and he found another 144 in his toolshed how many more nails does he need to buy if he needs a total of 500 nails ?
Example Output:
109