#include <bits/stdc++.h>
using namespace std;
int n;
int a[100001], b[100001], f[100001];
pair<int, int> p[100001];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> p[i].first >> p[i].second;
  sort(p, p + n);
  f[0] = 1;
  for (int i = 1; i < n; ++i) {
    int l = 0, r = i;
    if (p[i].first - p[i].second <= p[l].first) {
      f[i] = 1;
      continue;
    }
    while (r - l > 1) {
      int m = (l + r) / 2;
      if (p[i].first - p[i].second <= p[m].first)
        r = m;
      else
        l = m;
    }
    f[i] = f[l] + 1;
  }
  int q = -1;
  for (int i = 0; i < n; ++i) q = max(q, f[i]);
  cout << n - q;
  return 0;
}
