#include <bits/stdc++.h>
using namespace std;
const int MAX = 1 << 17;
pair<int, int> a[MAX];
int main()
{
int n;
cin >> n;
for(int i = 0; i < n; i++)
{
int x, d;
cin >> x >> d;
a[i] = {x + d, x - d};
}
sort(a, a + n);
int last = 0, ans = 1;
for(int i = 1; i < n; i++)
{
if(a[i].second > a[last].first)
{
last = i;
ans++;
}
}
cout << n - ans << "\n";
return 0;
}