Kiran's family took a road trip to Niagara Falls. Kiran slept through the last 62% of the trip. If the total length of the trip was 1000 miles, how many miles had they travelled when Kiran fell asleep?