successive_win::Int->Int->Int
successive_win init_point k = if init_point >= k then 0 else 1 + (successive_win (init_point*2) k)

solver::Int->Int->Double
solver n k = let n_d = fromIntegral n in
             (sum [0.5^(fromIntegral (successive_win (n-i) k))|i<-[0..(n-1)]])/n_d

main::IO()
main=do
  (n:k:[])<-return.map read.words=<<getLine
  print (solver n k)