#include <bits/stdc++.h>
using namespace std;
int a[100005];
vector<pair<int, int>> t;
bool pairsort(pair<int, int> e1, pair<int, int> e2) {
  return e1.first <= e2.first;
}
int main() {
  int n;
  cin >> n;
  int pos, pow;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &pos, &pow);
    t.push_back(make_pair(pos, pow));
  }
  sort(t.begin(), t.end(), pairsort);
  memset(a, 0, sizeof(a));
  a[0] = 0;
  a[1] = 1;
  for (int i = 1; i < t.size(); i++) {
    if (t[i].first - t[i].second > t[i - 1].first) {
      a[i + 1] = a[i] + 1;
    } else {
      int l = 0;
      int r = i - 1;
      int k = t[i].first - t[i].second;
      while (r > l) {
        int mid = (r + l) / 2;
        if (t[mid].first >= k)
          r = mid;
        else
          l = mid + 1;
      }
      a[i + 1] = a[l] + 1;
    }
  }
  int max = 0;
  for (int i = 0; i <= n; i++) {
    max = max > a[i] ? max : a[i];
  }
  int ans = n - max;
  cout << ans << endl;
  return 0;
}
