import math
n,k = map(int, input().split())
s = 0
ans = 0
for x in range(1,n+1):
  if x >= k:
    a = 0
  else:
    a = math.ceil(math.log2(k/x))
  b = (1 / n) * ((0.5) ** a)  
  ans += b
  
   
print(ans) import math math n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = 0 s 0 ans = 0 ans 0 for x in range(1,n+1):
  if x >= k:
    a = 0
  else:
    a = math.ceil(math.log2(k/x))
  b = (1 / n) * ((0.5) ** a)  
  ans += b
  
    x range(1,n+1) range 1 n+1 n 1 if x >= k:
    a = 0
  else:
    a = math.ceil(math.log2(k/x))
   x >= k x k a = 0 a 0 a = math.ceil(math.log2(k/x)) a math.ceil(math.log2(k/x)) math.ceil math ceil math.log2(k/x) math.log2 math log2 k/x k x b = (1 / n) * ((0.5) ** a) b (1 / n) * ((0.5) ** a) 1 / n 1 n (0.5) ** a 0.5 a ans += b ans b print(ans) print ans n,k = map(int, input().split()) map(int, input().split()) n b = (1 / n) * ((0.5) ** a) (1 / n) * ((0.5) ** a) b ans = 0 0 ans s = 0 0 s a = math.ceil(math.log2(k/x)) math.ceil(math.log2(k/x)) a ans += b b ans k = map(int, input().split()) map(int, input().split()) k a = 0 0 a
import math
n,k = map(int, input().split())
s = 0
ans = 0
for x in range(1,n+1):
  if x >= k:
    a = 0
  else:
    a = math.ceil(math.log2(k/x))
  b = (1 / n) * ((0.5) ** a)  
  ans += b
  
   
print(ans)