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



def check(n):

  cnt = 0

  while n < K:

    n *= 2

    cnt += 1

  return cnt



import decimal



dec = decimal.Decimal



ind = 1

point = 0

x = 1 / N

y = 1 / 2

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

  res = check(i)

  point += x * (y**res)

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



p = 0

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

  cnt = 0

  n = i

  while n < K:

    n *= 2

    cnt += 1

  p += 1/N * (1/2)**cnt

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


def check(n):
    cnt = 0
    while n < K:
        n *= 2
        cnt += 1
    return cnt


import decimal

dec = decimal.Decimal
ind = 1
point = 0
x = 1 / N
y = 1 / 2
for i in range(ind, N + 1):
    res = check(i)
    point += x * (y**res)
print(point)

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

- - -def check(n): +p = 0 +for i in range(1, N + 1): +    n = i -    return cnt - - -import decimal - -dec = decimal.Decimal -ind = 1 -point = 0 -x = 1 / N -y = 1 / 2 -for i in range(ind, N + 1): -    res = check(i) -    point += x * (y**res) -print(point) +    p += 1 / N * (1 / 2) ** cnt +print(p)