/* Author haleyk10198 */
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <ctime>
#include <string>
#include <set>

#define E9 1000000000
#define INF 2147483647
#define PI 3.14159
#define ll long long
#define pii pair<int,int>

using namespace std;

vector<pii> arr;

int bins(int left,int right,int val){
	//classic binary search to find the last undestroyed beacon
	int mid=(left+right)>>1;
	if(arr[mid].first<val&&arr[mid+1].first>=val)
		return mid;
	else if(arr[mid].first>=val)
		return bins(left,mid-1,val);
	else
		return bins(mid+1,right,val);
}

int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a,b;
		scanf("%d%d",&a,&b);
		arr.push_back(pii(a,b));
	}
	sort(arr.begin(),arr.end());
	int dp[n][2]; //state 0:off state1: on
	for(int i=0;i<n;i++){
		dp[i][0]=0;
		dp[i][1]=1;
	}
	for(int i=1;i<n;i++){
		dp[i][0]=max(dp[i-1][0],dp[i-1][1]);
		//if the beacon is not activated then take the max number of prev. positions
		if(arr[i].first-arr[i].second>arr[0].first){
			int prev=bins(0,n-1,arr[i].first-arr[i].second);
			dp[i][1]=dp[prev+1][0]+1;
			//if it is to be activated then add it by finding the last undestroyed beacon
		}
	}
	printf("%d\n",n-max(dp[n-1][0],dp[n-1][1]));
	return 0;
}
