{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import qualified Data.ByteString.Char8 as BS
import           Data.List             (sortOn, transpose)
import           Data.Maybe            (fromJust)
import           Data.Ord              (Down (Down))

main :: IO ()
main = do
  [n, h] <- readInts <$> BS.getLine
  abs' <- map readInts . BS.lines <$>  BS.getContents
  print $ solve n h abs'

solve :: Int -> Int -> [[Int]] -> Int
solve _ h abs' = c + d where
  [as, bs] = transpose abs'
  maxA = maximum as
  (c, h') = throwSword (0, h) . sortOn Down $ filter (maxA <) bs
  d = (h' + maxA - 1) `div` maxA

throwSword :: (Int, Int) -> [Int] -> (Int, Int)
throwSword ch [] = ch
throwSword (c, h) (b:bs)
  | h < 0 = (c, 0)
  | otherwise = throwSword (c + 1, h - b) bs

readInt :: BS.ByteString -> Int
readInt = fst . fromJust . BS.readInt

readInts :: BS.ByteString -> [Int]
readInts = map readInt . BS.words
