program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

function med3(x,y,z:Integer):Integer;
begin
  if (x < y) then begin
    if (y < z) then
      result:= y
    else if(z < x) then
      result:= x
    else
      result:= z;
  end else begin
    if (z < y) then
      result:= y
    else if (x < z) then
      result:= x
    else
      result:= z;
  end;
end;

procedure quicksort1(a:array of integer; left,right:integer);
var
  i,j,pivot,tmp:integer;
begin
  if (left < right) then begin
    i := left;
    j := right;
    pivot := med3(a[i], a[i + (j - i) div 2], a[j]);
    while true do begin
      while (a[i] < pivot) do
        inc(i);
      while (pivot < a[j]) do
        dec(j);
      if (i >= j) then
        break;
      tmp := a[i];
      a[i]:= a[j];
      a[j]:= tmp;
      inc(i);
      dec(j);
    end;
    quicksort1(a, left, i - 1);
    quicksort1(a, j + 1, right);
  end;
end;
var
  n,h,a,atemp,i,j,min,sw,turn:Integer;
  b:array of Integer;
begin
  try
    { TODO -oUser -cConsole Main : ここにコードを記述してください }
    Read(n);
    Readln(h);
    SetLength(b,n);
    a:=0;
    for i := 0 to n - 1 do begin
      Read(atemp);
      Readln(b[i]);
      a:=(a+atemp + abs(a-atemp))div 2;
    end;

    QuickSort1(b, Low(b), High(b));

    turn:=0;
    for i := 0 to n - 1 do begin
      h:=h- (a+b[n-1-turn] + abs(a-b[n-1-turn]))div 2;
      Inc(turn);
      if h<=0 then
        break;
    end;

    turn:=turn+ h div a;
    if h mod a >0 then
      inc(turn);

    Writeln(turn);
    readln;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.
