input_nk = gets.chomp
n,k = input_nk.split.collect{ |item| item.to_i}
sump = 0.0

1.upto(n) do |start|
  if start < k
    coin =  Math.log(k/start,2).ceil
    sump += 0.5 ** (coin)
  else
    sump += 1.0
  end
end

puts sump/n