Sam had a certain number of apples. He gave 15 apples to his friend, then bought 20 more apples from the store. After that, he ate 10 apples. If he now has 25 apples, how many apples did he start with? Let's think step by step and output the final answer within \boxed{}.
user