n,k = gets.chomp.split(" ").map{|i|i = i.to_i}
total=0.0
n.times do|_i_|
  i = 1 + _i_
  j=i
  count=0
  while (j<k) do
    j = j*2
    count+=1
  end
  #puts "now j = #{j}, count = #{count}"
  #puts "1/#{n} = #{1.0/n}"
  #puts "1/(2**#{count}) = #{1.0/(2**count)}"
  total += ( 1.0/n * 1.0/(2**count) )
  #puts "now i = #{i}, total = #{total}"
end

puts total