Long long time ago, in a far away country, $$$n$$$ economic agents gathered and built a nation. Initially everyone had $$$1$$$ dollar. In the following $$$2020^{2019} - n$$$ days, 1 dollar of value appeared and went to a randomly chosen person. How was this person chosen? Assume at the beginning of a day, the capitals of people are $$$s_1, s_2, \dots, s_n$$$ dollars. The probability of the $$$i$$$-th person getting the dollar is $$$\frac{s_i}{s_1+\ldots+s_n}$$$.
Many years have passed, and now you, a young promising sociologist, are making an inequality research on this old nation. You've managed to ask the poorest person about hir capital. What is conditional expectation of the richest person capital?
Formally, let $$$s_i$$$ be the number of dollars the $$$i$$$-th agent has after all this time, $$$\sum_{i = 1}^{n} s_i = 2020^{2019}$$$. Denote by $$$p_i$$$ the share of the $$$i$$$-th person, i.e. $$$p_i = \frac{s_i}{s_1+\ldots+s_n}$$$. Let $$$p_{(1)}\leqslant p_{(2)} \leqslant \ldots \leqslant p_{(n)}$$$ denote the sorted shares. You are given $$$a=p_{(1)}$$$. Find conditional expectation $$$E(p_{(n)}|p_{(1)}=a)$$$.
For discrete random variables $$$X$$$ and $$$Y$$$, and some given value $$$b$$$ such that $$$P(Y=b) \gt 0$$$, we define conditional expectation $$$E(X|Y=b)$$$ as a weighted average value of $$$X$$$ if we only consider events where $$$Y=b$$$. Let $$$A$$$ be the set of all possible values that random variable $$$X$$$ can take. Formally,
$$$$$$ E(X|Y=b) = \frac{\sum_{a \in A} a \cdot P(X = a, Y = b)}{P(Y=b)}. $$$$$$
The only line of the input contains integer $$$n$$$ ($$$2 \leq n \leq 2000$$$) and real number $$$a$$$ ($$$0 \lt a \leq \frac{1}{n}$$$).
It is guaranteed that $$$a$$$ is given with no more than nine digits after decimal point, therefore $$$P(Y=a) \gt 0$$$ for any valid $$$a$$$.
Output one real number, the conditional expectation of the maximum share if the minimum share is equal to $$$a$$$. Your answer will be considered correct if its absolute error doesn't exceed $$$10^{-6}$$$.
2 0.01
0.990000000000
100 0.01
0.010000000000
5 0.198802992
0.201920200333