#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> v;
vector<int> w;
vector<pair<int, int> > aux;
int dp[100002];
int prox[100002];
int solve(int i) {
  if (i < 0) {
    return 0;
  }
  int &x = dp[i];
  if (x == -1) {
    x = solve(prox[i]) + 1;
  }
  return x;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    aux.push_back(make_pair(x, y));
  }
  sort(aux.begin(), aux.end());
  for (int i = 0; i < n; i++) {
    v.push_back(aux[i].first);
    w.push_back(aux[i].second);
  }
  for (int i = n - 1; i >= 0; i--) {
    int pos = lower_bound(v.begin(), v.end(), v[i] - w[i]) - v.begin();
    prox[i] = pos - 1;
  }
  int ans = 0;
  memset(dp, -1, sizeof(dp));
  for (int i = n - 1; i >= 0; i--) {
    ans = max(ans, solve(i));
  }
  cout << n - ans << endl;
  return 0;
}
