#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
map<int, int> mp;
int n;
struct pnt {
  int x, w;
  bool operator<(const pnt &p) const { return x < p.x; }
} p[maxn];
int ask(int x) {
  int res = 0;
  for (int i = x; i > 0; i -= (i & -i))
    if (mp.count(i)) res = max(res, mp[i]);
  return res;
}
void update(int x, int v) {
  for (int i = x; i < 0x3f3f3f3f; i += (i & -i)) mp[i] = max(mp[i], v);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &p[i].x, &p[i].w);
  sort(p, p + n);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int tmp = ask(p[i].x - p[i].w);
    ans = max(ans, tmp + 1);
    update(p[i].x + p[i].w, tmp + 1);
  }
  printf("%d\n", ans);
  return 0;
}
