Detailed Instructions: 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.
Problem:Mary had 18 baseball cards , and 8 were torn . Fred gave Mary 26 new baseball cards . Mary bought 40 baseball cards . How many baseball cards does Mary have now ?
Solution:
84