module Main(main) where
import Data.List

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

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

