local mce, mfl, msq, mmi, mma = math.ceil, math.floor, math.sqrt, math.min, math.max
local n, k = io.read("*n", "*n")
local res = 0
for i = 1, n do
  local ti = i
  local rate = 1
  while(ti < k) do
    rate = rate / 2
    ti = ti * 2
  end
  res = res + rate / n
end
print(string.format("%.10f", res))
