module Main(main) where
import Data.List

takeawh h [] = []
takeawh h (x:xs) = if x < h then x:takeawh (h-x) xs
                   else [x]

attack katana h =
  let as = map head katana
      bs = map (head . tail) katana
      ma = foldl max 1 as
      tk = takeawh h $ sort $ filter (> ma) bs
      h' = fromIntegral $ max 0 (h - (foldl (+) 0 tk))
      al = length tk + (floor ((h' / (fromIntegral ma) :: Double) + 0.5))
  in al

main :: IO ()
main = do
  [n,h] <- map read . words <$> getLine :: IO [Int]
  katana <- (map $ map read . words) <$> (sequence $ replicate n getLine) :: IO [[Int]]
  print $ attack katana h

