Max has a collection of action figures. He gave away half of his collection to his cousin. He sold 15 action figures to a friend. He donated a third of the remaining action figures to a local charity. After that, he kept the final 10 action figures for himself. How many action figures did Max originally have? Let's think step by step and output the final answer within \boxed{}.
user