const
  fin = 'camci.in';
  fout = 'camci.out';
  maxN = 10000;

type
  TBoat = record
            p, l : Longint;
          end;

var
  n, m : Integer;
  c : array[1..maxN] of TBoat;



procedure ReadInput;
var
  f : Text;
  i : Integer;
begin
  Assign(f, fin);
  Reset(f);
  Readln(f, n);
  for i := 1 to n do
    Readln(f, c[i].l, c[i].p);
  Close(f);
end;


procedure Sort;
var
  tmp : TBoat;

  procedure QuickSort(l, r : Integer);
  var
    i, j : Integer;
    p : Longint;
  begin
    i := l;
    j := r;
    p := c[(l + r) div 2].p;
    repeat
      while c[i].p < p do inc(i);
      while p < c[j].p do dec(j);
      if i <= j then
      begin
        tmp := c[i];
        c[i] := c[j];
        c[j] := tmp;
        inc(i);
        dec(j);
      end;
    until i > j;
    if l < j then QuickSort(l, j);
    if i < r then QuickSort(i, r);
  end;

begin
  QuickSort(1, n);
end;


function Max(a, b : Longint) : Longint;
begin
  if a > b then
    Max := a
  else
    Max := b
end;


procedure Solve;
var
  i : Integer;
  l, r, t : Longint;
begin
  Sort;

  m := 1;
  r := c[1].p;

  for i := 2 to n do
    if c[i].p >= r then
    begin
      l := r;
      r := Max(c[i].p, r + c[i].l);
      inc(m);
    end else
    begin
      t := Max(c[i].p, l + c[i].l);
      if t < r then
        r := t;
    end;
end;


procedure WriteOutput;
var
  f : Text;
begin
  Assign(f, fout);
  Rewrite(f);
  Writeln(f, m);
  Close(f);
end;




begin
  ReadInput;
  Solve;
  WriteOutput;
end.
