Instructions: The task is to generate the correct answer for a given math problem.
Input: Problem: a car traveled from san diego to san francisco at an average speed of 54 miles per hour . if the journey back took twice as long , what was the average speed of the trip ?
Output:
36 .