#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int INF = 0x7FFFFFFF;
int n;
map<int, int> f;
pair<int, int> a[N];
int getMax(long long i) {
  int res = 0;
  for (i += 5; i > 0; i -= i & -i) {
    res = max(res, f[i]);
  }
  return res;
}
void setMax(long long i, int v) {
  for (i += 5; i < INF; i += i & -i) {
    f[i] = max(f[i], v);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d%d", &a[i].first, &a[i].second);
  }
  sort(a, a + n);
  f.clear();
  int ans = 0;
  for (int i = 0; i < (int)(n); i++) {
    int cur = getMax(a[i].first - a[i].second) + 1;
    ans = max(ans, cur);
    setMax(a[i].first + a[i].second, cur);
  }
  cout << ans << endl;
}
