#include <bits/stdc++.h>
using namespace std;
vector<int> T;
set<int> S;
map<int, int> pos;
pair<int, int> d[200010];
int n;
int R[200010];
class E {
 public:
  int type, x, i;
  E(int _t, int _x, int _i) {
    this->type = _t;
    this->x = _x;
    this->i = _i;
  }
};
vector<E> V;
int cmp(E e1, E e2) { return e1.x != e2.x ? e1.x < e2.x : e1.type < e2.type; }
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> d[i].first >> d[i].second;
    V.push_back(E(1, d[i].first - d[i].second, i));
    V.push_back(E(-1, d[i].first + d[i].second, i));
  }
  sort(V.begin(), V.end(), cmp);
  int res = 0;
  for (E e : V) {
    if (e.type == 1) {
      R[e.i] = res + 1;
    } else {
      res = max(res, R[e.i]);
    }
  }
  cout << res << endl;
  return 0;
}
