A chef had 58 apples. After making some pies, he had used 35. How many apples remained?