#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
struct p {
  int x, v;
  bool operator<(const p &t) const { return x > t.x; }
};
p makep(int x, int y) {
  p t;
  t.x = x;
  t.v = y;
  return t;
}
priority_queue<p> Q;
struct dot {
  int x, w;
  bool operator<(const dot &t) const { return x - w < t.x - t.w; }
} a[N];
int n, ans, m;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &a[i].x, &a[i].w);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    while (!Q.empty()) {
      p tmp = Q.top();
      if (tmp.x <= a[i].x - a[i].w) {
        m = max(m, tmp.v);
        Q.pop();
      } else
        break;
    }
    ans = max(ans, m + 1);
    Q.push(makep(a[i].x + a[i].w, m + 1));
  }
  printf("%d\n", ans);
}
