Under construction

Still being built. Things may change

Ornaments

Time limit1sMemory limit1024 MB

Summary
Given circle radius r, knot distance h, and extra percent s, compute the string length wrapped around the circle, rounded to two decimals.
Level

Easy3 of 10

Topics
Math, Geometry
Solved
No attempts yet

Problem

A factory is making ornaments for the upcoming holidays. Each ornament is a 2D glass sphere (that is, a circle) designed to hang from a hook or nail by a string tightly wrapped around it, as shown in the figure.

Write a program that calculates the length of the string, given the radius rr of the circle, the distance hh from the knot to the center of the circle, and a multiplier for the extra string needed to tie the knot.

Input

The input contains multiple test cases. Each test case is a single line with three integers rr (1 ≤ rr ≤ 1000), hh (rr ≤ hh ≤ 10000), and ss (0 ≤ ss ≤ 100). ss is the extra string needed, in percent. The percentage is relative to the length needed without accounting for the knot, so if s=25s = 25, the length must be increased by 1/4.

The input ends with a line containing three zeros.

Output

For each test case, output the length of the needed string, rounded to two decimal places.

Examples1

  1. Example 1

    Input
    1 3 10
    2 5 8
    10 11 0
    0 0 0
    
    Expected output
    10.43
    18.46
    63.40