#include <iostream>
#include <math.h>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <cstring>
#include <iomanip>
#include <set>
#include <bitset>
#include <unordered_map>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using piii = tuple<int,int,int>;
#define f first
#define s second
#define endl '\n'
#define all(x) begin(x),end(x)
#define m_p make_pair
int main(){
int n;cin >> n;
stack<pii> st;
for(int i{};i < n;i++){
int x,y;cin >> x >> y;
while(!st.empty() && x-st.top().f <= y-st.top().s) st.pop();
if(!(!st.empty() && x-st.top().f <= st.top().s-y)) st.emplace(x,y);
}
cout << st.size();
}