You are given a math word problem and you are supposed to only use subtraction on the numbers embedded in the text to answer the following question and then only report the final numerical answer.

Context: Dan has $ 4. He had $ 3 left with him after he bought a candy bar.

Question: How much did the candy bar cost?
1