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

summary = 0.0

(1..N).each do |dice|
  summary += if dice >= @K
               1.0 / N
             else
               ((1.0 / 2)**Math.log2(@K / dice.to_f).ceil) * (1.0 / N)
             end
end

puts summary