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