main = do
  [n, k] <- map read . words <$> getLine
  print $ prob n k

prob n k = (fromIntegral $ sum $ map ((2 ^) . ((times 1) -) . times) [1..n])
    / (fromIntegral $ n * 2 ^ (times 1))
  where
    times i = length $ takeWhile (< k) $ iterate (*2) i