Sofia's family took a road trip to Mount Rushmore. Sofia slept through the last 65% of the trip. If the total length of the trip was 840 miles, how many miles had they travelled when Sofia fell asleep?