import Control.Monad
import Data.List

readInts = map read . words <$> getLine :: IO [Int]

f h ds = g 0 h th
  where
    sw = maximum $ map head ds
    th = sort $ filter (<negate sw) $ map (negate . head . tail) ds
    g t r [] = t +div (r + sw - 1) sw
    g t r (x:xs)
      | r+x<=0 = t+1
      | otherwise = g (t+1) (r+x) xs

main = readInts >>= \[n, h] -> f h <$> replicateM n readInts >>= print