from decimal import Decimal

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

t = 0

i = 1

while(i < K):

    t += 1

    i *= 2

under = 2**t



p = 0

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

    c = 0

    while(i < K):

        c += 1

        i *= 2

    p += 2**(t-c)

print((Decimal(p/((2**t)*N))))

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

t = 0

i = 1

while(i < K):

    t += 1

    i *= 2

under = 2**t



p = 0

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

    c = 0

    while(i < K):

        c += 1

        i *= 2

    p += 2**(t-c)

print((p/((2**t)*N)))
from decimal import Decimal

N, K = list(map(int, input().split()))
t = 0
i = 1
while i < K:
    t += 1
    i *= 2
under = 2**t
p = 0
for i in range(1, N + 1):
    c = 0
    while i < K:
        c += 1
        i *= 2
    p += 2 ** (t - c)
print((Decimal(p / ((2**t) * N))))

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

-from decimal import Decimal - -print((Decimal(p / ((2**t) * N)))) +print((p / ((2**t) * N)))