import qualified Data.ByteString.Char8 as BC
import qualified Data.IntMap as M
import Data.Maybe (fromJust)
import Data.List

main = do
  [n,h] <- map read . words <$> getLine :: IO [Int]
  [a, b] <- transpose <$> getInt2DListBC
  let aMax = maximum a
      b' = filter (> aMax) b
      bSum = sum b'
      remain = h - bSum
      count = if mod remain aMax == 0
                then div remain aMax
                else (+1) $ div remain aMax
  print $ (length b') + count

bsToInt :: BC.ByteString -> Int
bsToInt = fst . fromJust . BC.readInt

getInt2DListBC :: IO [[Int]]
getInt2DListBC = map (map bsToInt . BC.words) . BC.lines <$> BC.getContents
