Phoenix hiked the Rocky Path Trail last week. It took four days to complete the trip. The first two days she hiked a total of 22 miles. The second and third days she averaged 13 miles per day. The last two days she hiked a total of 30 miles. The total hike for the first and third days was 26 miles. How many miles long was the trail?