#include <bits/stdc++.h>
using namespace std;
const int maxN = 4e5 + 10;
int n, ft[maxN];
pair<int, int> a[maxN];
void Update(int i, int v) {
  while (i <= 2 * n) {
    ft[i] = max(ft[i], v);
    i += i & -i;
  }
}
int Query(int i) {
  int ans = 0;
  while (i) {
    ans = max(ans, ft[i]);
    i -= i & -i;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d%d", &a[i].first, &a[i].second);
  vector<int> V;
  for (int i = 0; i < n; ++i) {
    V.push_back(a[i].first - a[i].second);
    V.push_back(a[i].first + a[i].second);
  }
  sort(V.begin(), V.end());
  map<int, int> m;
  for (int i = 0; i < V.size(); ++i) m[V[i]] = i + 1;
  int ans = 0;
  sort(a, a + n);
  for (int i = 0; i < n; ++i) {
    int x = Query(m[a[i].first - a[i].second]) + 1;
    ans = max(ans, x);
    Update(m[a[i].first + a[i].second], x);
  }
  cout << ans;
  return 0;
}
