import math

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



def func(dice):

    if dice >= K:

        return 1.0

    return (1 / 2) ** math.ceil(math.log2(K / dice))



l = [func(dice) / N for dice in range(1, N + 1)]

print((sum(l)))
import math

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



ans = 0

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

    if n >= K:

        ans += 1

        continue

    ans += (1/2) ** math.ceil(math.log2(K / n))



print((ans / N))
import math

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


def func(dice):
    if dice >= K:
        return 1.0
    return (1 / 2) ** math.ceil(math.log2(K / dice))


l = [func(dice) / N for dice in range(1, N + 1)]
print((sum(l)))

import math

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

- - -def func(dice): -    if dice >= K: -        return 1.0 -    return (1 / 2) ** math.ceil(math.log2(K / dice)) - - -l = [func(dice) / N for dice in range(1, N + 1)] -print((sum(l))) +ans = 0 +for n in range(1, N + 1): +    if n >= K: +        ans += 1 +        continue +    ans += (1 / 2) ** math.ceil(math.log2(K / n)) +print((ans / N))