
open Scanf
open Printf

let flip f x y = f y x

let read_int () = scanf " %d" (fun x -> x)
let rec read_ints n = if n = 0 then [] else let i = read_int () in i :: read_ints (n-1)

let rec rep n f = if n <= 0 then [] else let x = f () in x :: rep (n-1) f

let check1 hp atks =
  let rec f c hp atks = match atks with
    | [] -> None
    | (a::atks') -> if a >= hp then Some c else f (c+1) (hp-a) atks' in
  f 1 hp atks

let () =
  let n = read_int () in let h = read_int () in
  let xs = rep n (fun () ->
    let a = read_int () in let b = read_int () in (a, b)) in
  let a_max = List.fold_left max 0 (List.map fst xs) in
  let b_use = List.sort (flip (-)) @@ List.filter ((<=) a_max) (List.map snd xs) in
  match check1 h b_use with
  | Some c -> printf "%d\n" c
  | None ->
      let pre_c = List.length b_use in
      let rest = h - List.fold_left (+) 0 b_use in
      printf "%d\n" (pre_c + (rest + a_max - 1) / a_max)
