#include <bits/stdc++.h>
using namespace std;
struct date {
  int x, y;
};
int n, sol;
int v[2 * 200010], dp[2 * 200010];
date t[200010];
bool cmp(const date &a, const date &b) { return (a.x < b.x); }
inline int lsb(int x) { return (x & (-x)); }
int search1(int st, int dr, int val) {
  int sol;
  while (st <= dr) {
    int m = (st + dr) / 2;
    if (v[m] == val) {
      sol = m;
      dr = m - 1;
    } else if (v[m] > val)
      dr = m - 1;
    else
      st = m + 1;
  }
  return sol;
}
void update(int pos, int val) {
  for (int i = pos; i <= 2 * n; i += lsb(i)) dp[i] = max(dp[i], val);
}
int query(int pos) {
  int sol = 0;
  for (int i = pos; i >= 1; i -= lsb(i)) sol = max(sol, dp[i]);
  return sol;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &t[i].x, &t[i].y);
    v[2 * i - 1] = t[i].x - t[i].y;
    v[2 * i] = t[i].x + t[i].y;
  }
  sort(v + 1, v + 2 * n + 1);
  sort(t + 1, t + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    int x = search1(1, 2 * n, t[i].x - t[i].y);
    int y = search1(1, 2 * n, t[i].x + t[i].y);
    int curent = query(x) + 1;
    update(y, curent);
  }
  for (int i = 1; i <= 2 * n; i++) sol = max(sol, dp[i]);
  printf("%d", sol);
  return 0;
}
