import math
n,k=map(int, input().split())
ans=0
for i in range(1,n+1):
  if i>=k:
    ans+=1/n
  else:
    ans+=0.5**math.ceil(math.log2(k/i))/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 ans=0 ans 0 for i in range(1,n+1):
  if i>=k:
    ans+=1/n
  else:
    ans+=0.5**math.ceil(math.log2(k/i))/n i range(1,n+1) range 1 n+1 n 1 if i>=k:
    ans+=1/n
  else:
    ans+=0.5**math.ceil(math.log2(k/i))/n i>=k i k ans+=1/n ans 1/n 1 n ans+=0.5**math.ceil(math.log2(k/i))/n ans 0.5**math.ceil(math.log2(k/i))/n 0.5**math.ceil(math.log2(k/i)) 0.5 math.ceil(math.log2(k/i)) math.ceil math ceil math.log2(k/i) math.log2 math log2 k/i k i n print(ans) print ans ans=0 0 ans ans+=1/n 1/n ans k=map(int, input().split()) map(int, input().split()) k n,k=map(int, input().split()) map(int, input().split()) n ans+=0.5**math.ceil(math.log2(k/i))/n 0.5**math.ceil(math.log2(k/i))/n ans
import math
n,k=map(int, input().split())
ans=0
for i in range(1,n+1):
  if i>=k:
    ans+=1/n
  else:
    ans+=0.5**math.ceil(math.log2(k/i))/n
print(ans)