#include<bits/stdc++.h>
using namespace std;
#define f first
#define s second
bool cmp(const pair<int, int> a, const pair<int, int> b){
if(a.f == b.f) return a.s > b.s;
return a.f < b.f;
}
int main(){
freopen("mountains.in", "r", stdin);
freopen("mountains.out", "w", stdout);
int n;
cin >> n;
vector<pair<int, int> > a;
for(int i = 1;i <= n;i++){
int x, y;
cin >> x >> y;
a.push_back({x - y, x + y});
}
sort(a.begin(), a.end(), cmp);
int visible = 0;
int r = -1;
for(auto m : a){
if(m.s > r){
r = m.s;
visible++;
}
}
cout << visible << endl;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBmIGZpcnN0IAojZGVmaW5lIHMgc2Vjb25kICAKYm9vbCBjbXAoY29uc3QgcGFpcjxpbnQsIGludD4gYSwgY29uc3QgcGFpcjxpbnQsIGludD4gYil7CgkKCWlmKGEuZiA9PSBiLmYpIHJldHVybiBhLnMgPiBiLnM7CgoJcmV0dXJuIGEuZiA8IGIuZjsgIAoKfSAKaW50IG1haW4oKXsKCWZyZW9wZW4oIm1vdW50YWlucy5pbiIsICJyIiwgc3RkaW4pOwoJZnJlb3BlbigibW91bnRhaW5zLm91dCIsICJ3Iiwgc3Rkb3V0KTsKCWludCBuOwoJY2luID4+IG47Cgl2ZWN0b3I8cGFpcjxpbnQsIGludD4gPiBhOyAgCglmb3IoaW50IGkgPSAxO2kgPD0gbjtpKyspewoJCWludCB4LCB5OwoJCWNpbiA+PiB4ID4+IHk7CgkJYS5wdXNoX2JhY2soe3ggLSB5LCB4ICsgeX0pOyAgCgl9IAoJc29ydChhLmJlZ2luKCksIGEuZW5kKCksIGNtcCk7CglpbnQgdmlzaWJsZSA9IDA7CglpbnQgciA9IC0xOyAgCglmb3IoYXV0byBtIDogYSl7ICAKCQlpZihtLnMgPiByKXsKCQkJciA9IG0uczsKCQkJdmlzaWJsZSsrOyAKCQl9IAoJfSAgCgljb3V0IDw8IHZpc2libGUgPDwgZW5kbDsgIAp9IA==