import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Ord

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [n,h] <- getIntList
    [as,bs] <- transpose <$> replicateM n getIntList
    let amax = maximum as
        bls = takeWhile (>= amax) $ sortOn Down bs
    print . length . takeWhile (< h) . scanl (+) 0 $ bls ++ [amax,amax..]