#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...) 47
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<int> x(n), e(n);
for (int i = 0; i < n; i++) {
cin >> x[i] >> e[i];
}
vector<int> ord(n);
iota(ord.begin(), ord.end(), 0);
sort(ord.begin(), ord.end(), [&](int i, int j) {
return x[i] < x[j];
});
vector<int> a(n), b(n);
for (int i = 0; i < n; i++) {
a[i] = x[ord[i]];
b[i] = e[ord[i]];
}
vector<int> t(n), s(n);
for (int i = 0; i < n; i++) {
t[i] = a[i] - b[i];
s[i] = a[i] + b[i];
}
set<int> k(x.begin(), x.end());
cout << k.size() << '\n';
return 0;
}