(* O(log(k)) *)
let rec find acc k x =
  if x >= k then acc
  else find (acc + 1) k (x * 2)

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