#include <bits/stdc++.h>
using namespace std;
template <class T>
void debug(T a, T b) {
  for (; a != b; a++) cerr << *a << ' ';
  cerr << endl;
}
template <class T>
bool isprime(T x) {
  int till = (T)sqrt(x + .0);
  if (x <= 1) return 0;
  if (x == 2) return 1;
  if (x / 2 * 2 == x) return 0;
  for (int i = 3; i <= till; i += 2)
    if (x / i * i == x) return 0;
  return 1;
}
int n;
int x[200100];
int w[200100];
int ord[200100];
map<int, int> x2id;
const int INF = 1e9;
const int MAXST = 1 << 19;
struct SegTreeMax {
  int stmax[2 * MAXST];
  SegTreeMax() { fill(stmax, stmax + 2 * MAXST, 0); }
  void upd(int v, int vl, int vr, int idx, int val) {
    if (vr < idx || idx < vl) return;
    if (idx == vl && vr == idx)
      stmax[v] = val;
    else {
      upd(2 * v + 1, vl, (vl + vr) / 2 + 0, idx, val);
      upd(2 * v + 2, (vl + vr) / 2 + 1, vr, idx, val);
      stmax[v] = max(stmax[2 * v + 1], stmax[2 * v + 2]);
    }
  }
  int get(int v, int vl, int vr, int l, int r) {
    if (vr < l || r < vl) return 0;
    if (l <= vl && vr <= r)
      return stmax[v];
    else {
      int a = get(2 * v + 1, vl, (vl + vr) / 2 + 0, l, r);
      int b = get(2 * v + 2, (vl + vr) / 2 + 1, vr, l, r);
      return max(a, b);
    }
  }
} segtree;
bool myowncmpyeah(const int &i, const int &j) { return x[i] < x[j]; }
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> w[i];
    x2id[x[i] + w[i]] = -1;
    x2id[x[i] - w[i]] = -1;
  }
  for (int i = 0; i < n; i++) ord[i] = i;
  sort(ord, ord + n, myowncmpyeah);
  int nx2id = 0;
  for (auto it = x2id.begin(); it != x2id.end(); it++) it->second = nx2id++;
  int res = 0;
  for (int i = 0; i < n; i++) {
    int idx = x2id[x[ord[i]] - w[ord[i]]];
    int cur = segtree.get(0, 0, nx2id - 1, 0, idx) + 1;
    res = max(res, cur);
    idx = x2id[x[ord[i]] + w[ord[i]]];
    segtree.upd(0, 0, nx2id - 1, idx, cur);
  }
  cout << res;
  return EXIT_SUCCESS;
}
