A group of tourists are on a 3-day long trip. They hike 1/8 of the trail on the first day. On the second day, they hike 4/7 of the remaining distance. On the third day, they hike 1/3 of the remaining distance, plus the final 8 km. How many kilometers long is the trail?