#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
pair<int, int> beacon[MAXN];
int n, f[MAXN];
int main() {
  int i, j, ans = MAXN;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d%d", &beacon[i].first, &beacon[i].second);
  sort(beacon + 1, beacon + 1 + n);
  for (i = 1; i <= n; ++i) {
    j = lower_bound(beacon + 1, beacon + 1 + n,
                    pair<int, int>(beacon[i].first - beacon[i].second, 0)) -
        beacon;
    if (j > 1 && beacon[j - 1].first < beacon[i].first - beacon[i].second)
      f[i] = f[j - 1] + 1;
    else
      f[i] = 1;
    if (n - f[i] < ans) ans = n - f[i];
  }
  printf("%d\n", ans);
  return 0;
}
