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

solve :: Int -> Int -> Double
solve n k = foldr1 (+) [ go i | i <- [1..n] ] / (fromIntegral n)
  where
    go :: Int -> Double
    go i | i >= k    = 1.0
         | otherwise = go (i * 2) * 0.5