#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int MOD = 1000000007;
const int MAXN = 10005;
int tree[N];
vector<int> v;
struct Node {
  int x, w;
} node[N];
int lowbit(int x) { return x & (-x); }
void add(int x, int v) {
  while (x < N) tree[x] = max(tree[x], v), x += lowbit(x);
}
int sum(int x) {
  int res = 0;
  while (x) res = max(res, tree[x]), x -= lowbit(x);
  return res;
}
bool comp(Node a, Node b) { return a.x < b.x; }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i)
    scanf("%d %d", &node[i].x, &node[i].w), v.push_back(node[i].x + node[i].w);
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  sort(node + 1, node + n + 1, comp);
  for (int i = 1; i <= n; ++i) {
    int t = lower_bound(v.begin(), v.end(), node[i].x - node[i].w) - v.begin();
    int p =
        lower_bound(v.begin(), v.end(), node[i].x + node[i].w) - v.begin() + 1;
    if (v[t] > node[i].x - node[i].w) --t;
    int dp;
    if (t < 0)
      dp = 1;
    else
      dp = sum(t + 1) + 1;
    add(p, dp);
  }
  printf("%d\n", sum(N - 1));
  return 0;
}
