Tournament Wins

In a random single elimination bracket of 2^k players, you are ranked r; find your expected number of wins.

Medium6ProbabilityCombinatoricsNo attempts yetTime limit1sMemory limit512 MB

Problem

You are one of 2k2^k competitors in a single elimination tournament. The published rankings place you rrth, and rank 1 is the strongest. In any match the higher ranked player always wins, so the player with the smaller rank number advances.

The bracket is the only source of uncertainty. Every way of assigning the 2k2^k competitors to the bracket slots is equally likely. Determine your expected number of wins, the average of your win count over all bracket orderings.

Input

The input is a single line containing the two space separated integers kk (1k201 \le k \le 20) and rr (1r2k1 \le r \le 2^k).

Output

Print your expected number of wins on a single line, rounded to exactly five decimal places. The sixth digit after the decimal point of the exact answer is never 4 or 5, so the rounding is never ambiguous.

Intermediate values can become very small or very large, so pick your arithmetic with care.