def LI():
    return list(map(int, input().split()))


N, K = LI()
ans = 0
for i in range(1, N+1):
    x = 1
    count = i
    while count < K:
        count *= 2
        x /= 2
    ans += x/N
print(ans) def LI():
    return list(map(int, input().split())) LI return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split N, K = LI() N LI() LI K ans = 0 ans 0 for i in range(1, N+1):
    x = 1
    count = i
    while count < K:
        count *= 2
        x /= 2
    ans += x/N i range(1, N+1) range 1 N+1 N 1 x = 1 x 1 count = i count i while count < K:
        count *= 2
        x /= 2
     count < K count K count *= 2 count 2 x /= 2 x 2 ans += x/N ans x/N x N print(ans) print ans ans = 0 0 ans x /= 2 2 x x = 1 1 x count = i i count count *= 2 2 count def LI():
    return list(map(int, input().split())) def LI():
    return list(map(int, input().split())) LI K = LI() LI() K N, K = LI() LI() N ans += x/N x/N ans
def LI():
    return list(map(int, input().split()))


N, K = LI()
ans = 0
for i in range(1, N+1):
    x = 1
    count = i
    while count < K:
        count *= 2
        x /= 2
    ans += x/N
print(ans)
