A bee flew from garden A to garden B. For the first 1 hour, it flew at an average speed of 760 m/h, and after that, it flew at an average speed of 820 m/h. If the distance between garden A and garden B is 1252 meters, what was the total time for the whole journey?