#include <bits/stdc++.h>
int a[10004];
int b[10005];
using namespace std;
int main() {
  int n, y, lon = 0, gob = 0;
  cin >> n >> y;
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  sort(a, a + n);
  for (int j = 0; j < n; j++)
    if (b[j] < a[n - 1]) {
      b[j] = 0;
      lon++;
    }
  sort(b, b + n);
  for (int q = n - 1; q >= lon; q--) {
    gob += b[q];
    if (gob >= y) {
      cout << n - q;
      system("pause");
      return 0;
    }
  }
  cout << n - lon + (y - gob + a[n - 1] - 1) / a[n - 1];
  system("pause");
  return 0;
}
