Torus Travel#8717

Torus Travel

1 second
128 megabytes
Hard

Torus is a surface that is composed of points at a distance of from a circle with radius in 3D space. is then called a central circle of a torus; line perpendicular to the plane of that also contains the centre of C is called torus' axis; and are major and minor torus radiuses, accordingly. A circle on a torus is called major if its centre is on torus' axis and minor if its radius is and its plane contains torus' axis.

Young traveller Senya lives on a torus-shaped planet with major radius and minor radius . There is a regular road map on this planet: minor roads at equal distance from each other (located on minor circles), and major roads (on major circles): outer — the most distant from the axis, inner — the least distant one, and also northern and southern equal to the central circle on the opposite sides of the planet.

Each of the minor roads belongs to one country. Each country has only cities on the intersections of its minor road with all major roads.

![prb8717.gif](https://static.e-olymp.com/content/68/687dca17d8e43d4dbebf3e364a4b569a1afecae8.gif)

Left picture illustrates the definition and shows minor and major radiuses. The right one shows major roads and n = 3 minor roads with cities on their intersections.

Senya wants to become The Great Traveller, which means that he wants to visit every country on the planet. He considers a country visited if he has travelled along the road between two different cities of this country. Of course, movement on his planet is allowed only by the roads.

Please, help Senya to find the distance he need to cover to become The Great Traveller, if he starts his journey in a city on the inner road.

Input

The first line contains three integers: , - minor and major torus radiuses and - number of countries (1 \leq r < R \leq 10^9, 1 \leq n \leq 10^9).

Output

Output should contain one real number minimal distance Senya has to cover. Your answer should have an absolute or relative error not greater than 10^{-9}.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Note

In the second example let i_k, s_k, n_k, o_k represent the cities of -th country on the inner, southern, northern and outer roads, accordingly. One of the minimal paths looks like: i_1 \to s_1 \to s_2 \to i_2 \to i_3 \to n_3 \to i_3 \to i_4 \to s_4. Covered distance equals to of country length, two segments of inner road and one of southern. So the answer is 5/4 \cdot 2\pi \cdot 1 + 2 \cdot 2\pi \cdot 2 / 4 + 2\pi \cdot 3 / 4 = 6\pi \approx 18.849555922.