from math import ceil

n, k = map(int, input().split())

bef = n + 1
ans = 0
div = 1
while k > 0.5:
    a = ceil(k)
    cnt = max(0, bef - a)
    ans += cnt * div
    div /= 2
    k /= 2
    bef = min(n + 1, a)
print(ans / n) from math import ceil n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k bef = n + 1 bef n + 1 n 1 ans = 0 ans 0 div = 1 div 1 while k > 0.5:
    a = ceil(k)
    cnt = max(0, bef - a)
    ans += cnt * div
    div /= 2
    k /= 2
    bef = min(n + 1, a) k > 0.5 k 0.5 a = ceil(k) a ceil(k) ceil k cnt = max(0, bef - a) cnt max(0, bef - a) max 0 bef - a bef a ans += cnt * div ans cnt * div cnt div div /= 2 div 2 k /= 2 k 2 bef = min(n + 1, a) bef min(n + 1, a) min n + 1 n 1 a print(ans / n) print ans / n ans n bef = n + 1 n + 1 bef a = ceil(k) ceil(k) a bef = min(n + 1, a) min(n + 1, a) bef k = map(int, input().split()) map(int, input().split()) k n, k = map(int, input().split()) map(int, input().split()) n div = 1 1 div cnt = max(0, bef - a) max(0, bef - a) cnt ans += cnt * div cnt * div ans ans = 0 0 ans div /= 2 2 div k /= 2 2 k
from math import ceil

n, k = map(int, input().split())

bef = n + 1
ans = 0
div = 1
while k > 0.5:
    a = ceil(k)
    cnt = max(0, bef - a)
    ans += cnt * div
    div /= 2
    k /= 2
    bef = min(n + 1, a)
print(ans / n)