import math



n, k = list(map(int, input().split()))

count = 0

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

  a = max(0, math.ceil(math.log2(k/i)))

  count += 1 / (n * 2**a)

print(count)
n, k = list(map(int, input().split()))

ans = 0

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

  cnt = 1

  while i < k:

    i *= 2

    cnt /= 2

  ans += cnt

ans /= n

print(ans)
import math

n, k = list(map(int, input().split()))
count = 0
for i in range(1, n + 1):
    a = max(0, math.ceil(math.log2(k / i)))
    count += 1 / (n * 2**a)
print(count)

n, k = list(map(int, input().split()))
ans = 0
for i in range(1, n + 1):
    cnt = 1
    while i < k:
        i *= 2
        cnt /= 2
    ans += cnt
ans /= n
print(ans)

-import math - -count = 0 +ans = 0 -    a = max(0, math.ceil(math.log2(k / i))) -    count += 1 / (n * 2**a) -print(count) +    cnt = 1 +    while i < k: +        i *= 2 +        cnt /= 2 +    ans += cnt +ans /= n +print(ans)