A battalion, 20 miles long, advances 20 miles. During this time, a messenger on a horse travels from the rear of the battalion to the front and immediately turns around, ending up precisely at the rear of the battalion...

A battalion, 20 miles long, advances 20 miles. During this time, a messenger on a horse travels from the rear of the battalion to the front and immediately turns around, ending up precisely at the rear of the battalion upon the completion of the 20-mile journey. How far has the messenger traveled?