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.
Q: cody had a bag of marbles . later he gave 5 to his brother . now cody has 7 marbles . how many marbles did cody have to start with ?
A:
12