Last year, Stewart bought three apple pies and two chocolate cakes per month when his income was $40,000. What was the total amount spent by Stewart on apple pies and chocolate cakes in a year?