A sound wave travels through a medium at a speed of 340 meters per second. An observer is located 20 meters away from a sound source that emits a frequency of 500 Hz. The observer also hears a faint echo from a wall located 25 meters behind the sound source. Assuming the temperature conditions are standard and that the sound wave does not have any significant attenuation, calculate the total time it takes for the observer to hear the sound directly and the echo.