def cc
	n,k = gets.chomp.split(/\s/).map{|x| x.to_i}

    rr = 0
    for i in 1..n
        m = 0
        l = i
        while l <= k-1
            l *= 2
            m += 1
        end

        r = Rational(1, n)
        r *= Rational(1, 2)**m
        rr += r
    end

    puts rr.to_f
end

cc
