#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = MOD + 1;
const long double EPS = 1e-10;
template <class T>
T &chmin(T &a, const T &b) {
  return a = min(a, b);
}
template <class T>
T &chmax(T &a, const T &b) {
  return a = max(a, b);
}
struct Edge {
  int from, to;
  int cost;
  bool operator<(const Edge &e) const { return cost < e.cost; }
  bool operator>(const Edge &e) const { return cost > e.cost; }
};
void add_edge(vector<vector<Edge>> &g, int from, int to, int cost) {
  g[from].push_back(Edge{from, to, cost});
}
void dijkstra(vector<vector<Edge>> &g, vector<int> &d, int s) {
  d.assign(g.size(), INF);
  d[s] = 0;
  priority_queue<pair<int, int>, vector<pair<int, int>>,
                 greater<pair<int, int>>>
      que;
  que.push(pair<int, int>(0, s));
  while (!que.empty()) {
    int dist = que.top().first;
    int v = que.top().second;
    que.pop();
    if (d[v] < dist) continue;
    for (int i = (0); i < (g[v].size()); i++) {
      Edge e = g[v][i];
      if (d[e.to] > d[v] + e.cost) {
        d[e.to] = d[v] + e.cost;
        que.push(pair<int, int>(d[e.to], e.to));
      }
    }
  }
}
int main() {
  int n;
  vector<pair<int, int>> v;
  cin >> n;
  for (int i = (0); i < (n); i++) {
    int a, b;
    cin >> a >> b;
    v.emplace_back(a, b);
  }
  v.emplace_back(-INF, 0);
  sort(v.begin(), v.end());
  vector<int> dist(v.size());
  for (int i = (0); i < (v.size()); i++) dist[i] = v[i].first;
  vector<vector<Edge>> g(v.size());
  for (int i = (1); i < (v.size()); i++) {
    int p = v[i].first - v[i].second;
    int pp = lower_bound(dist.begin(), dist.end(), p) - dist.begin() - 1;
    add_edge(g, pp, i, 1);
  }
  vector<int> d;
  dijkstra(g, d, 0);
  int ans = n - *max_element(d.begin(), d.end());
  cout << ans << endl;
  return 0;
}
