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

Example Input: Tom bought 40 tickets at the state fair . He spent 28 tickets at the ' dunk a clown ' booth and decided to use the rest on rides . If each ride cost 4 tickets , how many rides could he go on ?
Example Output: 3

Example Input: Katie had 7 pages of math homework and 3 pages of reading homework . If each page had 9 problems on it , how many problems did she have to complete total ?
Example Output: 90

Example Input: For the school bake sale Paige made pastries . She baked 36 cupcakes and 9 cookies . After the sale she had 4 to take back home . How many pastries did she sell ?
Example Output:
41