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

result = []
(1..N).each do |dice|
  count = 0
  point = dice
  while point < K do
    point = point * 2
    count += 1
  end
  result << (1 / N.to_f) * 0.5 ** count
end

puts result.inject(&:+)
