let [|N;K|] =
    stdin.ReadLine().Split()
    |> Array.map int

let rec f x v =
    if x>=K then v
    else f (2*x) (v+1.0)

[|1..N|]
|> Array.sumBy (fun x -> 1.0/float(N)*(0.5**(f x 0.0)))
|> stdout.WriteLine