import Data.List
import Data.Maybe

main = do
  (n:h:_) <- getLine >>= return . map read . words :: IO [Int]
  ktn <- getContents >>= return . map (map read . words) . lines :: IO [[Int]]

  let
    (a:_) = maximumBy (\(x:_) (y:_) -> compare x y) ktn
    b = scanl (+) 0 $ reverse $ sort $ map (\(x:y:_) -> y) $ filter (\(_:x:_) -> x > a) ktn
  
    c = findIndex (>=h) b

    d =
      if c == Nothing then
        ceiling ((fromIntegral (h-last b)) / (fromIntegral a)) + (length b - 1)
      else
        fromJust c

  print $ d
