(* O(n log k) *)
let n, k = Scanf.scanf " %d %d" @@ fun a b -> a, b
let p = 1. /. float n
let ans = ref 0.
let _ =
  for i = 1 to n do
    let score = ref i in
    let j = ref 0 in
    while !score < k do score := !score * 2; incr j done;
    ans := !ans +. p *. 0.5 ** float !j done;
  Printf.printf "%.12f\n" !ans