Detailed Instructions: 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.
Problem:ned was buying books about astronomy . he bought 8 books about the planets and 4 about the space program . how many books did he buy total ?
Solution:
12