import math

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

result = 0

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

  result += (1/N) * 0.5 ** math.ceil(math.log(math.ceil(K/i), 2))

print(result)
import math

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



i = 1

result = 0

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

  p = 0

  while i * (2 ** p) < K:

    p += 1

  result += (1 /N) * (0.5 ** p)



print(result)
import math

N, K = list(map(int, input().split()))
result = 0
for i in range(1, N + 1):
    result += (1 / N) * 0.5 ** math.ceil(math.log(math.ceil(K / i), 2))
print(result)

import math

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

+i = 1 -    result += (1 / N) * 0.5 ** math.ceil(math.log(math.ceil(K / i), 2)) +    p = 0 +    while i * (2**p) < K: +        p += 1 +    result += (1 / N) * (0.5**p)