import math
N, K = map(int, input().split())
if K == 1:
  print(1)
  exit()

ans = 0

for i in range(1, N + 1):
  if i >= K:
    ans += (1 / N)
  else:
    temp = math.log(K / i, 2)
    nu = pow(2, math.ceil(temp))
    ans += (1 / (nu * N))
print(ans) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K if K == 1:
  print(1)
  exit() K == 1 K 1 print(1) print 1 exit() exit ans = 0 ans 0 for i in range(1, N + 1):
  if i >= K:
    ans += (1 / N)
  else:
    temp = math.log(K / i, 2)
    nu = pow(2, math.ceil(temp))
    ans += (1 / (nu * N)) i range(1, N + 1) range 1 N + 1 N 1 if i >= K:
    ans += (1 / N)
  else:
    temp = math.log(K / i, 2)
    nu = pow(2, math.ceil(temp))
    ans += (1 / (nu * N)) i >= K i K ans += (1 / N) ans 1 / N 1 N temp = math.log(K / i, 2) temp math.log(K / i, 2) math.log math log K / i K i 2 nu = pow(2, math.ceil(temp)) nu pow(2, math.ceil(temp)) pow 2 math.ceil(temp) math.ceil math ceil temp ans += (1 / (nu * N)) ans 1 / (nu * N) 1 nu * N nu N print(ans) print ans ans += (1 / (nu * N)) 1 / (nu * N) ans ans += (1 / N) 1 / N ans ans = 0 0 ans temp = math.log(K / i, 2) math.log(K / i, 2) temp N, K = map(int, input().split()) map(int, input().split()) N nu = pow(2, math.ceil(temp)) pow(2, math.ceil(temp)) nu K = map(int, input().split()) map(int, input().split()) K
import math
N, K = map(int, input().split())
if K == 1:
  print(1)
  exit()

ans = 0

for i in range(1, N + 1):
  if i >= K:
    ans += (1 / N)
  else:
    temp = math.log(K / i, 2)
    nu = pow(2, math.ceil(temp))
    ans += (1 / (nu * N))
print(ans)