시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB1711960.000%

문제

Today, instead of studying for the coming exams, a student with a nickname "Idned" has decided to take part in an open qualification for a huge DotA (Development of the Algorithms) tournament. The qualification is going to be a single-elimination tournament with $2^n$ participants, and Idned is one of them. There will be $n$ rounds in total. All other remaining participants will be randomly divided into pairs for each round with equal chances for any possible division. In each pair, the participants will play against each other, and the loser will quit the tournament (and will not participate in the further rounds).

Each participant has a unique rating, and Idned's rating is $k$-th highest. Idned is sure that the outcome of each game is fully determined by the ratings of two participants, and whoever has a higher rating will win. Using this assumption, can you determine the expected number of rounds in which Idned will take part?

입력

The input contains two integers $n$ and $k$: the total number of rounds and Idned's position in the overall rating ($1 \le n \le 10$; $1 \le k \le 2^n$).

출력

Output the expected number of rounds.

Your answer must be correct to within an absolute or relative error of $10^{-9}$. Formally, let your answer be $a$, and the jury's answer be $b$. Your answer will be considered correct if $\frac{|a-b|}{\max(1, |b|)} \le 10^{-9}$.

예제 입력 1

2 2

예제 출력 1

1.666666666667

예제 입력 2

3 5

예제 출력 2

1.457142857143