Let X be the money Mark had.

Mark spent 1/2*X + 14 in the first store and 1/3*X + 16 in the second store.

Mark has X - 1/2*X - 14 - 1/3*X - 16 = $0 left.

Combining like terms, we get 1/6*X - 30 = $0.

Adding 30 to both sides and multiplying both sides by 6, we find that Mark had X = $180 when he entered the first store.

# Answer

180
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Mark went to a store where he spent one-half of his money, and then spent $14 more. He then went to another store where he spent one-third of his starting money, and then spent $16 more. If he then had no money left, how much did he have when he entered the first store?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
180
Mark went to a store where he spent one-half of his money, and then spent $14 more. He then went to another store where he spent one-third of his starting money, and then spent $16 more. If he then had no money left, how much did he have when he entered the first store?
train