Fleecing the Raffle

Add k slips with your name to a box of n slips so the chance your name is drawn exactly once among p draws is maximized.

Medium5MathCombinatoricsProbabilityBrute forceNo attempts yetTime limit2sMemory limit512 MB

Problem

A raffle gives out pp prizes. To enter, you write your name on a slip of paper and drop it into the raffle box. The winners are decided by drawing pp slips from the box. A drawn slip is not put back, so one person wins at most one prize.

Putting your name in more than once breaks the rules. The organizers do not check the names in the box, so you are caught only if your name is drawn for two or more prizes. Extra slips can therefore raise your chance of a prize.

Other people have put nn slips into the box. You add kk slips carrying your own name (k1k \ge 1), so the box holds n+kn + k slips and pp of them are drawn uniformly at random. Choose kk so that the probability that your name is drawn exactly once is as large as possible.

Input

The first line contains two integers nn and pp separated by a space (2pn1062 \le p \le n \le 10^6). nn is the number of slips in the box other than yours, and pp is the number of prizes given away.

Output

Print the largest possible probability of winning a prize on one line, rounded to exactly nine digits after the decimal point. Pad with zeros when digits are missing. For example, a probability of 0.60.6 is printed as 0.600000000.