input = gets.chomp.split(" ").map(&:to_i)

N = input[0]
K = input[1]

probability = 0
(1..N).each do |e|
  i = 0
  while e* (2 ** i) < K do
    i += 1
  end
  probability += 1 / (2 ** i).to_f
end

puts probability / N.to_f