solve :: Integer -> Integer -> Integer -> Double
solve n k i = 1.0 / (fromIntegral m * fromIntegral n)
    where m = head [ (2 ^ x) | x <- [0 ..], i * (2 ^ x) >= k ] :: Integer

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