#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int a[N], b[N], f[N], id[N];
int n;
bool cmp(int x, int y) { return a[x] < a[y]; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", a + i, b + i);
    id[i] = i;
  }
  sort(id + 1, id + n + 1, cmp);
  f[0] = 0;
  for (int i = 1; i <= n; ++i) {
    int lo = 1, hi = i, leftmost = i;
    while (lo <= hi) {
      int mid = (lo + hi) / 2;
      if (a[id[i]] - b[id[i]] <= a[id[mid]]) {
        leftmost = min(leftmost, mid);
        hi = mid - 1;
      } else {
        lo = mid + 1;
      }
    }
    f[i] = f[leftmost - 1] + i - leftmost;
  }
  int ans = 1 << 30, j;
  for (int i = 0; i <= n; ++i) {
    if (f[i] + n - i < ans) {
      ans = f[i] + n - i;
      j = i;
    }
  }
  cout << ans << endl;
}
