#include <bits/stdc++.h>
using namespace std;
long long tree[500000 + 10];
long long read(int idx) {
  long long maxval = 0;
  while (idx <= 500000) {
    maxval = max(maxval, tree[idx]);
    idx += (idx & -idx);
  }
  return maxval;
}
void update(int idx, long long v) {
  while (idx > 0) {
    tree[idx] = max(tree[idx], v);
    idx -= (idx & -idx);
  }
}
vector<pair<long long, long long> > XW;
set<long long> diff_xw;
int num_ids;
map<long long, int> ids;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x, w;
    cin >> x >> w;
    XW.push_back(make_pair(x, w));
    diff_xw.insert(x - w);
    diff_xw.insert(x + w);
  }
  num_ids = 0;
  for (set<long long>::iterator it = diff_xw.begin(); it != diff_xw.end();
       ++it) {
    ids[*it] = num_ids + 1;
    num_ids++;
  }
  sort(XW.begin(), XW.end());
  for (int j = 0; j <= 500000; j++) tree[j] = 0;
  long long answer = 0;
  for (int j = (int)XW.size() - 1; j >= 0; j--) {
    long long summ = XW[j].first + XW[j].second;
    long long diff = XW[j].first - XW[j].second;
    int id = ids[summ];
    long long curr = read(id) + 1;
    answer = max(answer, curr);
    update(ids[diff], curr);
  }
  cout << answer << endl;
}
