#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, HP, throwP = 0, count = 0, j = 0, k;
  cin >> N >> HP;
  int swordC[N], swordT[N];
  for (int i = 0; i < N; i++) {
    cin >> swordC[i] >> swordT[i];
  }
  sort(swordC, swordC + N);
  sort(swordT, swordT + N);
  for (k = N - 1; k >= 0; k--) {
    if (swordC[N - 1] > swordT[k]) {
      break;
    }
  }
  for (int i = k + 1; i < N; i++) {
    throwP = throwP + swordT[i];
  }
  if (HP > throwP) {
    HP = HP - throwP;
    while (HP > 0) {
      HP = HP - swordC[N - 1];
      count = count + 1;
    }
    cout << count + N - k - 1 << endl;
  } else {
    while (HP > 0) {
      j++;
      HP = HP - swordT[N - j];
    }
    cout << j << endl;
  }
  return 0;
}
