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.

Q: 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 ?

A: 3
****
Q: A painter needed to paint 10 rooms in a building . Each room takes 8 hours to paint . If he already painted 8 rooms , how much longer will he take to paint the rest ?

A: 16
****
Q: Dan bought 9 dozen eggs from the grocery store to bake some cakes . How many eggs did Dan buy ?

A:
108
****