import Data.List
import Data.Maybe
import Control.Monad
import qualified Data.ByteString.Char8 as B

main :: IO ()
main = do
    [n,h] <- map read . words <$> getLine :: IO [Int]
    (as,bs) <- unzip <$> replicateM n ((\[a,b]->(a,b)) . 
               map (fst . fromJust . B.readInt) . B.words <$> B.getLine) :: IO ([Int],[Int])
    let a = maximum as
    let (i,b) = last . takeWhile ((h >) . snd) . zip [0..] . scanl (+) 0 $ filter (> a) bs
    print $ fromIntegral i + ceiling (fromIntegral (h - b) / fromIntegral a)