f n k=let p=n`div`2 in if p/=0 then f p (k+1) else k
main=do
 [n,k]<-map read.words<$>getLine :: IO [Int]
 let sp=f k 1
     sq=sum$map(\x->2^(sp-f (k`div`x) 0))[2..n]
     sqq=read(show (sq+1))::Double
     spp=read(show (n*(2^sp)))::Double
 print$sqq/spp