Torus Travel

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Torus is a surface that composed of points at a distance of rr from a circle CC with radius RR in 3D space. CC is then called a central circle of a torus; line perpendicular to the plane of CC that also contais the center of CC is called torus' axis; RR and rr are major and minor torus radiuses, accordingly. A circle on a torus is called bigger if it's center is on torus' axis and lesser if it's radius is rr and it's plane contains torus' axis.

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

Each lesser road is a property of one of nn countries. Each country has only 44 cities on the intersections of it's lesser road with all 44 bigger roads.

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

Senya wants to become The Great Traveler, which means that he wants to visit every country on the planet. He considers a country visited if he has traveled 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 Traveler, if he starts his journey in a city on the inner road.

입력

The first line of input contains three integers: rr, RR --- minor and major torus radiuses and nn --- number of countries (1r<R109 1 \le r < R \le 10^9; 1n1091 \le n \le 10^9).

출력

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

힌트

In the second example let i_k,s_k,n_k,o_ki\_k, s\_k, n\_k, o\_k represent the cities of kk-th country on the inner, southern, nothern and outer roads, accordingly. One of the minimal paths looks like: i_1s_1s_2i_2i_3n_3i_3i_4s_4i\_1 \rightarrow s\_1 \rightarrow s\_2 \rightarrow i\_2 \rightarrow i\_3 \rightarrow n\_3 \rightarrow i\_3 \rightarrow i\_4 \rightarrow s\_4 . Covered distance equals to 54\frac{5}{4} of country length, two segments of inner road and one of southern. So the answer is 542π1+22π24+2π34=6π18.849555922\frac{5}{4} \cdot 2 \pi \cdot 1 + 2 \cdot \frac{2 \pi \cdot 2}{4} + \frac{2 \pi \cdot 3}{4} = 6 \pi \approx 18.849555922.