let () =
  Scanf.scanf "%d %d" @@ fun n k ->
  Array.init n (fun i -> 
    let rec aux c x = if x >= k then c else aux (c+1) (2*x) in
    0.5 ** float_of_int (aux 0 (i+1)))
  |> Array.fold_left (+.) 0.
  |> fun p -> Printf.printf "%.11f\n" (p /. float_of_int n)