let () =
    let main () =
        let n, k = Scanf.sscanf (read_line ()) "%d %d" (fun n k -> n, k) in
        let log2 j k =
            let rec loop c i =
                if c >= k then i else loop (c * 2) (i + 1)
            in
            loop j 0
        in
        let rec loop i acc =
            if i = 0 then acc else loop (i - 1) (acc +. 0.5 ** float (log2 i k))
        in
        let ans = loop n 0.0 /. float n in
        Printf.printf "%.10f\n" ans
    in
    main ()