exception Exodus
let call_cc f =
  let return = ref (fun () -> raise Not_found) in
  try f (fun x -> (return := fun () -> x); raise Exodus)
  with Exodus -> !return ()

let () =
  let n, h = Scanf.scanf "%d %d\n" (fun n h -> n, h) in
  let abs = Array.to_list @@ Array.init n (fun _ ->
    Scanf.scanf "%d %d\n" (fun a b -> a, b)) in
  Printf.printf "%d\n" @@ call_cc (fun k ->
    List.map snd abs
    |> List.sort (fun a b -> compare b a)
    |> List.fold_left (fun (n, h) b ->
        if h <= b then k (n + 1)
        else (n + 1, h - b)) (0, h)
    |> List.filter (( <= ) max_a)
    |> (fun (n, h) ->
        let max_a = List.fold_left max 0 @@ List.map fst abs in
        n + (h + max_a - 1) / max_a))