#include <bits/stdc++.h>
using namespace std;
const int N = 6e5 + 44;
int n, t[4 * N];
int getMax(int v, int vl, int vr, int l, int r) {
  if (vl > r || vr < l)
    return 0;
  else if (vl >= l && vr <= r)
    return t[v];
  else {
    int vm = vl + (vr - vl) / 2;
    return max(getMax(2 * v + 1, vl, vm, l, r),
               getMax(2 * v + 2, vm + 1, vr, l, r));
  }
}
void update(int v, int vl, int vr, int ind, int val) {
  if (vl == vr) {
    t[v] = val;
  } else {
    int vm = vl + (vr - vl) / 2;
    if (ind <= vm) {
      update(2 * v + 1, vl, vm, ind, val);
    } else {
      update(2 * v + 2, vm + 1, vr, ind, val);
    }
    t[v] = max(t[2 * v + 1], t[2 * v + 2]);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<pair<int, pair<int, int>>> v;
  vector<int> tmp;
  for (int i = 0; i < n; i++) {
    int x, w;
    cin >> x >> w;
    tmp.push_back(x);
    tmp.push_back(x - w);
    tmp.push_back(x + w);
    v.push_back({x, {x - w, x + w}});
  }
  sort(tmp.begin(), tmp.end());
  tmp.erase(unique(tmp.begin(), tmp.end()), tmp.end());
  for (int i = 0; i < v.size(); i++) {
    v[i].first = lower_bound(tmp.begin(), tmp.end(), v[i].first) - tmp.begin();
    v[i].second.first =
        lower_bound(tmp.begin(), tmp.end(), v[i].second.first) - tmp.begin();
    v[i].second.second =
        lower_bound(tmp.begin(), tmp.end(), v[i].second.second) - tmp.begin();
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) {
    int diff = v[i].second.first;
    int mx = getMax(0, 0, N, 0, diff);
    update(0, 0, N, v[i].second.second, mx + 1);
  }
  cout << getMax(0, 0, N, 0, N);
}
