n, k = [int(i) for i in input().split()]

win = 0

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

  for j in range(k):

    if i * 2 ** j >= k:

      win += 0.5 ** j / n

      break

print(win)
from math import ceil, log2



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

print((sum(0.5 ** max(ceil(log2(k / i)), 0) for i in range(1, n + 1)) / n))

n, k = [int(i) for i in input().split()]
win = 0
for i in range(1, n + 1):
    for j in range(k):
        if i * 2**j >= k:
            win += 0.5**j / n
            break
print(win)

from math import ceil, log2

n, k = list(map(int, input().split()))
print((sum(0.5 ** max(ceil(log2(k / i)), 0) for i in range(1, n + 1)) / n))

-n, k = [int(i) for i in input().split()] -win = 0 -for i in range(1, n + 1): -    for j in range(k): -        if i * 2**j >= k: -            win += 0.5**j / n -            break -print(win) +from math import ceil, log2 + +n, k = list(map(int, input().split())) +print((sum(0.5 ** max(ceil(log2(k / i)), 0) for i in range(1, n + 1)) / n))