N, K = gets.chomp.split.map(&:to_i)

array = Array.new(N) { |i| [i + 1, Rational(1, N)] }

while array[0][0] < K
  0.upto(N - 1) do |i|
    break if array[i][0] >= K
    array[i][0] *= 2
    array[i][1] /= 2
  end
end

puts array.inject(0) { |ans, a| ans + a[1] }.to_f
