#include <bits/stdc++.h>
using namespace std;
int n, m, l, r, i, ans, tp, dp[400005];
struct my {
  int x, y, z;
} a[400005];
bool cmp(my l, my r) { return (l.x < r.x || (l.x == r.x && l.y < r.y)); }
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (i = 1; i <= n; ++i) {
    cin >> l >> r;
    m++;
    a[m].x = l - r;
    a[m].y = 1;
    a[m].z = i;
    m++;
    a[m].x = l + r;
    a[m].y = -1;
    a[m].z = i;
  }
  sort(a + 1, a + m + 1, cmp);
  for (i = 1; i <= m; ++i) {
    if (a[i].y == 1) {
      dp[a[i].z] = tp + 1;
      ans = max(ans, dp[a[i].z]);
    } else {
      tp = max(tp, dp[a[i].z]);
    }
  }
  cout << ans;
}
