N,K = list(map(int,input().split()))

res = 0

for i in range(1,N+1):

    counter = 0

    while i < K:

        counter += 1

        i *= 2

    res += (2**(-counter))

print(((1/N)*res))
from math import log2, ceil

N, K = list(map(int, input().split()))

ans = 0

for i in range(1, N+1):

    if i >= K:

        ans += (1/N)

    else:

        p = K / i

        ans += (1/N)*(1/2)**(ceil(log2(p)))

print(ans)

N, K = list(map(int, input().split()))
res = 0
for i in range(1, N + 1):
    counter = 0
    while i < K:
        counter += 1
        i *= 2
    res += 2 ** (-counter)
print(((1 / N) * res))

from math import log2, ceil

N, K = list(map(int, input().split()))
ans = 0
for i in range(1, N + 1):
    if i >= K:
        ans += 1 / N
    else:
        p = K / i
        ans += (1 / N) * (1 / 2) ** (ceil(log2(p)))
print(ans)

+from math import log2, ceil + -res = 0 +ans = 0 -    counter = 0 -    while i < K: -        counter += 1 -        i *= 2 -    res += 2 ** (-counter) -print(((1 / N) * res)) +    if i >= K: +        ans += 1 / N +    else: +        p = K / i +        ans += (1 / N) * (1 / 2) ** (ceil(log2(p))) +print(ans)