#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double PI = acos(-1.0);
void file() {}
const int N = 2e5;
vector<pair<int, int>> v;
vector<int> sch;
int n;
int dp[N][2];
int solve(int idx, bool f) {
  if (idx < 0) return 0;
  int &ret = dp[idx][f];
  if (~ret) return ret;
  ret = 1e9;
  if (f) ret = solve(idx - 1, 1) + 1;
  int j = lower_bound(((sch).begin()), ((sch).end()),
                      v[idx].first - v[idx].second) -
          sch.begin();
  ret = min(ret, solve(j - 1, 0) + (idx - max(j, 0)));
  return ret;
}
int main() {
  fixed;
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  file();
  memset(dp, -1, sizeof(dp));
  cin >> n;
  v = vector<pair<int, int>>(n);
  for (int i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  sort(((v).begin()), ((v).end()));
  sch = vector<int>(n);
  for (int i = 0; i < n; i++) sch[i] = v[i].first;
  cout << solve(n - 1, 1) << endl;
}
