#include <bits/stdc++.h>
using namespace std;
int dp[100005];
pair<int, int> input[100005];
int main() {
  int n;
  int result;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &input[i].first, &input[i].second);
  }
  sort(input, input + n);
  dp[0] = 1;
  for (int i = 1; i < n; i++) {
    int start = 0, end = i, j = (start + end) / 2;
    while (j > 0 && !(input[i].first - input[i].second > input[j].first &&
                      input[i].first - input[i].second <= input[j + 1].first)) {
      if (input[i].first - input[i].second <= input[j].first) {
        end = j;
      } else {
        start = j + 1;
      }
      j = (start + end) / 2;
    }
    if (j == 0) {
      if (input[i].first - input[i].second <= input[j].first) {
        dp[i] = 1;
      } else {
        dp[i] = dp[j] + 1;
      }
    } else {
      dp[i] = dp[j] + 1;
    }
  }
  result = 0;
  for (int i = 0; i < n; i++) {
    result = max(result, dp[i]);
  }
  printf("%d\n", n - result);
  return 0;
}
