#include <bits/stdc++.h>
int f(const std::vector<int>& a, const std::vector<int>& b,
      std::vector<int>& ff, int pi) {
  if (ff[pi] == -1) {
    int j = a[pi] - b[pi];
    int next_pharos = -1;
    int l = 0, r = pi, m;
    while (r > l + 1) {
      m = (r + l) / 2;
      if (a[m] < j)
        l = m;
      else
        r = m;
    }
    if (a[l] >= j)
      ff[pi] = 0;
    else
      ff[pi] = 1 + f(a, b, ff, l);
  }
  return ff[pi];
}
int min_destroyed_pharos(const std::vector<int>& a, const std::vector<int>& b) {
  std::vector<int> ff(a.size(), -1);
  int mx = -1;
  for (int i = 0; i < a.size(); i++) mx = std::max(mx, f(a, b, ff, i));
  return a.size() - mx - 1;
}
int main() {
  int n;
  std::cin >> n;
  std::vector<std::pair<int, int>> c(n);
  std::vector<int> a(n), b(n);
  for (int i = 0; i < n; ++i) {
    std::cin >> c[i].first >> c[i].second;
  }
  std::sort(c.begin(), c.end());
  for (int i = 0; i < n; i++) {
    a[i] = c[i].first;
    b[i] = c[i].second;
  }
  std::cout << min_destroyed_pharos(a, b) << std::endl;
  return 0;
}
