[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

let rec f cnt curr line =
    if curr >= line then
        cnt
    else
        f (cnt + 1) (curr * 2) line

[<EntryPoint>]
let main _ =
    let [n;k] = reads int
    [1 .. n]
    |> List.map (fun x -> (1. / float n) * 0.5 ** float (f 0 x k))
    |> List.sum
    |> printfn "%0.12f"
    0