A group of friends are planning a road trip. If they all contributed $24, then they would be $6 short of the total. If they all contributed $25, then they would have $3 more than needed. What is the total cost of the trip?