Jake bakes and sell apple pies. He sells each pie for $5.75. The materials to make the pies cost $40. The boxes Jake puts the pies in cost $12.50 total. How many pies does Jake need to sell to earn a profit of $50?