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