Limits 1s, 512 MB

Datta, the famous sport programmer and gamer emerging from the southern part of Bangladesh is in dilemma. He needs to keep practicing to maintain both of his programming and gaming skills. When he was asked to write a problem, he came up with the following story that includes two of the legends of his favorite disciplines:

According to Wikipedia, Michael Grzesiek professionally known as Shroud, is a Canadian streamer and professional gamer.  He is known for playing  Counter-Strike: Global Offensive(CS-GO), PlayerUnknown's Battlegrounds(PUBG), and more recently Call of Duty Black Ops 4: Blackout. He is one of the most popular gamers in gaming community and also know as The King of Reddit.

Gennady Korotkevich is a Belarusian sport programmer known as tourist who has won major international competitions since age 11, as well as numerous national competitions. His top accomplishments include six consecutive gold medals in the International Olympiad in Informatics as well as the world championship in the 2013 and 2015 International Collegiate Programming Contest World Finals. As of May 2018, Korotkevich is the highest-rated programmer at most of the online contest platforms.

One day tourist challenged Shroud in a logical game. He gave Shroud a randomly shuffled jar of coins where each coin has the value of either +1 or -1. Now Shroud can randomly take out coins one by one from the jar. Shroud is allowed to stop at any moment including the starting of the game. Shroud need to tell the expected amount of money he will get if he play the game optimally. Since Shroud is a pro gamer but not a programmer, he needs your help to get the answer.

Input

Input contains two integers n and m (0≤n,m≤6000). Here, n is the number of coins with the value +1 and m is the number of coin with the value -1.

Output

Output contains a single line as sample output. The expected amount that Shroud will get if he play optimally. Print six digits after the floating point.

Samples

InputOutput
0 3
Answer from Shroud is 0.000000
InputOutput
4 0
Answer from Shroud is 4.000000
InputOutput
4 3
Answer from Shroud is 1.657143

Submit

Login to submit.

Statistics

77% Solution Ratio
dragoonEarliest, Dec '18
aminulFastest, 0.2s
bertho_coderLightest, 262 kB
SMAN2901Shortest, 456B
Toph uses cookies. By continuing you agree to our Cookie Policy.