Mary and Jolene are both growing tomatoes in their backyards to sell. Jolene had 3 times as many as Mary, but birds had eaten 6 before she picked them all. For the season they have a total of 54 tomatoes. How many tomatoes did Mary grow?