eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач
Задачи

Strong-Willed Victory

Strong-Willed Victory

Лимит времени 1 секунда
Лимит использования памяти 64 MiB

Yuri loves football. He is very happy when his favorite team wins. He is even happier when this is a strong-willed victory. A strong-willed victory is an outcome when the team wins, but was losing at least at one moment during the match. Recently Yuri learned the result of the last match of his favorite team: it won. He doesn't know how the score developed and now he is interested what is the probability that this was a strong-willed victory. Help Yuri calculate this. We will assume that any scenario of the match is equally probable. The scenario of the match is determined by the sequence in which the teams score goals.

Входные данные

The input file consists of two integers: a - the number of goals Yuri's favorite team scored and b - the number of goals scored by the rival team. (0b < a1000000).

Выходные данные

Print the probability that the last match of Yuri's favorite team was a strong-willed victory with six digits after the dot.

One of the three possible match scenarios is a strong-willed victory: when the rival team scores first. For the other two scenarios Yuri's favorite team isn't losing for a single moment.

Пример

Входные данные #1
2 1
Выходные данные #1
0.333333
Источник International Collegiate Programming Contest, Ukraine, Quarter-Final,May 19, 2011