Tickets to a fundraiser are $14 if purchased ahead of time, and $25 if purchased at the door. The total amount raised from all ticket sales was $788. If the number of tickets purchased ahead of time was five less than the number of tickets that were purchased at the door, how many tickets were purchased at the door?