403538: GYM101191 K Casino

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

K. Casinotime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard output

One of the world famous casino has designed a new card game. Certainly, you would like to take part at the game premiere held soon. However, you are thorough man. Therefore, you have decided to familiarize yourself with the game rules and to design a strategy to win maximum possible amount of money.

Game needs a card deck, which consists of N red and M black cards. The cards of the deck are shuffled randomly before game is started. Every round the player is randomly choosing one face-down card. If the player chooses a red card, then 1 million of Belorussian rubles will be added to his prize, otherwise 1 million of Belorussian rubles will be charged from his prize. Selected card does not return to the deck again. The player may stop the game at any moment and get his prize (probably, he will have to pay, if the prize is negative).

To estimate the benefit of participation in this game you are required to compute the expectation of the prize assuming that player are trying to maximize it.

Input

First line contains two positive integer numbers N and M — the number of red and black cards in the deck respectively (0 ≤ N, M ≤ 100).

Output

First line should contain the expected value of player's prize. Answer should be given in millions of Belorussian rubles. Answer is considered right if its absolute or relative error is less than 10 - 6

ExamplesInput
1 1
Output
0.500000000
Input
1 2
Output
0.000000000

加入题单

算法标签: