import Data.List

solve n k = foldl' step (0.0) [1..n]
    where
        step acc x
            | x >= k = acc + base
            | otherwise = acc + (base * additional)
                where
                    base = 1 / (fromIntegral n)
                    additional = 1 / (fromIntegral (2 ^ (f k x)))
        f aim v
            | v >= aim = 0
            | otherwise = 1 + f aim (v*2)

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