def get_int_array
    gets.strip.split(' ').map(&:to_i)
end

n,k = get_int_array
sum = 0
logk = Math.log10(k)
log2 = Math.log10(2)
n.times{|i|
    c = if i < k
        result = (logk - Math.log10(i + 1)) / log2
        result.ceil
    else
        0
    end
    pn = 1.0 / (2 ** c)
    sum += pn
}
puts sum / n