A student drives miles to a city for a conference and averages miles per gallon using his sedan. For the return trip, he uses a rental car that averages only miles per gallon. What was the average gas mileage, in miles per gallon, for the entire round trip?