Some of you might have seen instruments like the figure below.

Figure 1: Spirograph
There are a fixed circle (indicated by in the figure) and a smaller interior circle with some pinholes (indicated by ). By putting a pen point through one of the pinholes and then rolling the circle without slipping around the inside of the circle , we can draw curves as illustrated below. Such curves are called hypotrochoids.

Figure 2: An Example Hypotrochoid
Your task is to write a program that calculates the length of hypotrochoid, given the radius of the fixed circle , the radius of the interior circle , and the distance between the 's centroid and the used pinhole.
The input consists of multiple test cases. Each test case is described by a single line in which three integers , and appear in this order, where is the radius of the fixed circle , is the radius of the interior circle , and is the distance between the centroid of the circle and the pinhole. You can assume that 0 \leq R < Q < P \leq 1000. , , and are separated by a single space, while no other spaces appear in the input.
The end of input is indicated by a line with P = Q = R = 0.
For each test case, output the length of the hypotrochoid curve. The error must be within 10^{-2} ( = ).
Example 1