Input (grade 6): The total distance covered is, where is the straight-line distance from to the origin.
Output (grade 7): The total distance covered is r\/cos (Î), where r is the straight-line distance from P to the origin.