structure T  = TextIO
structure SC = StringCvt

fun i2s i = String.map (fn #"~" => #"-" | c => c) (Int.toString i)

fun println s = print (s ^ "\n")

fun nextInt () = T.scanStream (Int.scan SC.DEC) T.stdIn

fun loop (n, xs, ys) =
  if n <= 0 then (xs, ys)
  else
    let
      val SOME x = nextInt ()
      val SOME y = nextInt ()
    in
      loop (n - 1, x::xs, y::ys)
    end

fun merge ([], ys) = ys
  | merge (xs, []) = xs
  | merge (x::xs, y::ys) = if x >= y then x::merge (xs, y::ys)
                           else y::merge (x::xs, ys)

fun split ([], xs, ys)      = (xs, ys)
  | split ([x], xs, ys)     = (x::xs, ys)
  | split (x::y::l, xs, ys) = split (l, x::xs, y::ys)

fun msort []  = []
  | msort [x] = [x]
  | msort xs  =
  let
    val (left, right) = split (xs, [], [])
  in
    merge (msort left, msort right)
  end

fun solve (hp, x, [])    = if hp < 0 then 0 else (hp + x - 1) div x
  | solve (hp, x, y::ys) = if hp < 0 then 0
                           else if x < y then 1 + solve (hp - y, x, ys)
                           else (hp + x - 1) div x

val () =
  let
    val SOME n = nextInt ()
    val SOME h = nextInt ()
    val (xs, ys) = loop (n, [], [])
    val maxX = foldl Int.max 0 xs
    val ys' = msort ys
  in
    println (i2s (solve (h, maxX, ys')))
  end
