import           Data.Ratio

main :: IO ()
main = do
  [n, k] <- map read . words <$> getLine
  print $ solve n k

solve :: Int -> Int -> Double
solve n k = realToFrac $ (1 % n) * sum [(1 % 2) ^ f i | i <- [1 .. n]] where
  f i = length . takeWhile (< k) $ iterate (* 2) i
