Mary bought six apples from the store. From the apples she bought, for each that Mary ate, she planted two trees from the remaining ones. How many apples did Mary eat?
Please reason step by step, and put your final answer within \boxed{}.
user