АВТ
Язык:

Дистанционный практикум по программированию

Задачи Online статус Соревнования
Новости Справка СДО
 
Здравствуйте, Гость! Войдите с паролем или зарегистрируйтесь.

1333. Belt Drive

Ограничение времени: 1 сек.
Ограничение памяти:65536 КБайт
Баллы:100
Статистика Послать на проверку Задачу добавил debug

A belt drive consists of two pulleys of different radius (r1 and r2) connected by a belt of length l. The industry manufactures belts of different standard lengths, so the engineers often face a task of calculating the distance between the pulley centers given their radii and the belt length. There are several simple approximate methods to do this, which are precise enough for rough estimations. However, some engineering tasks require more precise data.

Your task is to write a program that will calculate the distance a between the centers of the pulleys given their radii r1 and r2, and the length l of the belt.

Limitations

1 £ r1, r2 £ 1,000; 2p(r1 + r2) £ l £ 10,000.

Input

The first line contains 3 space-delimited real numbers precise to four decimal places: r1, r2, l. Trailing zeros following the decimal point may be omitted.

Output

The output file should contain a single real number, the center-to-center distance a. The answer must be precise to four decimal places.

Example

Input

Output

1.0 2.0 20.0

5.191

1.0 2.0 18.85

4.6036

 

 


Статистика Послать на проверку Обсуждение задачи Автор/источник:
Задачи с соревнований и сборов / Чемпионат мира по программированию (ICPC) / Рыбинск-2014 /
1332. H - Cryptography 1333. 1334. J - Dominoes 1335. K - Embroidery
 
время генерации 0.11 сек.
© Copyright ВоГУ, АВТ, Носов Д.А., Андрианов И.А.