#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
ll n,r,c,count=0;
cin>>n;
vector<pair<ll,ll>> pt;
for(ll i=0;i<n;i++)
{
cin>>c>>r;
pt.push_back(make_pair(c-r,c+r));
}
sort(pt.begin(), pt.end());
ll cur = pt[0].second;
for (ll i = 1; i < n; ++i) {
// non intersecting circles
if (pt[i].first > cur) {
cur = pt[i].second;
}
// intersecting circles
else
count++;
}
cout<<count;
return 0;
}