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 = damage `div` hit + n - fromIntegral (length ns') + c
    where
        as = reverse . sort $ map fst ns
        bs = sort $ map snd ns
        bmin = head bs
        ns' = takeWhile (bmin <= ) as
        damage = (h - (sum $ (drop (length ns') bs)))
        hit = head as
        c = if damage `mod` hit == 0 then 0 else 1
