Tickets to the school play cost $9 for adults and $5 for students. The Wilson family bought 3 adult tickets and 4 student tickets. What was the total cost of the tickets?