#U2122FG2. Cow Camp

Cow Camp

To qualify for cow camp, Bessie needs to earn a good score on the last problem of the USACOW Open contest. This problem has TT distinct test cases (2T1032≤T≤103) weighted equally, with the first test case being the sample case. Her final score will equal the number of test cases that her last submission passes.Unfortunately, Bessie is way too tired to think about the problem, but since the answer to each test case is either "yes" or "no," she has a plan! Precisely, she decides to repeatedly submit the following nondeterministic solution:

if input == sample_input:
  print sample_output
else:
  print "yes" or "no" each with probability 1/2, independently for each test case

Note that for all test cases besides the sample, this program may produce a different output when resubmitted, so the number of test cases that it passes will vary.

Bessie knows that she cannot submit more than KK (1K1091≤K≤109) times in total because then she will certainly be disqualified. What is the maximum possible expected value of Bessie's final score, assuming that she follows the optimal strategy?

INPUT FORMAT (input arrives from the terminal / stdin):

The only line of input contains two space-separated integers TT and K.K.

OUTPUT FORMAT (print output to the terminal / stdout):

The answer as a decimal that differs by at most 10610−6 absolute or relative error from the actual answer.

SAMPLE INPUT:

2 3

SAMPLE OUTPUT:

1.875

In this example, Bessie should keep resubmitting until she has reached 33 submissions or she receives full credit. Bessie will receive full credit with probability 7878 and half credit with probability 1818, so the expected value of Bessie's final score under this strategy is 782**+181**=158**=**1.87578⋅2+18⋅1=158=1.875. As we see from this formula, the expected value of Bessie's score can be calculated by taking the sum over xx of p(x)xp(x)⋅x, where p(x)p(x) is the probability of receiving a score of xx.

SAMPLE INPUT:

4 2

SAMPLE OUTPUT:

2.8750000000000000000

Here, Bessie should only submit twice if she passes fewer than 33 test cases on her first try.

SCORING

  • Test cases 3-6 satisfy T25T≤25 and K≤**100.**K≤100.
  • Test cases 7-9 satisfy K106**.**K≤106.
  • Test cases 10-17 satisfy no additional constraints.