(* O(n * log(k)) *)
Scanf.scanf "%d %d" @@ fun n k ->
  let rec find acc x =
    if x >= k then acc
    else find (acc *. 0.5) (x * 2) in
  let sum = ref 0. in
  for i = 1 to n do
    let p = find 1. i in
    sum := !sum +. p /. float n
  done;
  Printf.printf "%.12f\n" !sum