import Control.Applicative
import Data.List
import Control.Monad
strToInteger s = (read :: String -> Integer) s

main :: IO ()
main = do
    -- スペース区切り整数の入力
    [n, h] <- map strToInteger . words <$> getLine
    ns <- replicateM (fromInteger n) $ do
        [a, b] <- map strToInteger . words <$> getLine
        return (a, b)
    -- 出力
    putStrLn . show $ func ns n h

func :: [(Integer, Integer)] -> Integer -> Integer -> Integer
func ns n h = if sum bs <= h then damage `div` amax + (fromIntegral $ length bs) + c
                             else fromIntegral $ length $ takeWhile (> h) $ scanl (+) 0 bs
    where
        amax = maximum $ map fst ns
        bs = takeWhile (amax <) $ reverse . sort $ map snd ns
        damage = if h - (sum bs) > 0 then h - (sum bs) else 0
        c = if damage `mod` amax == 0 then 0 else 1
