#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a[10000] = {0}, b[10000] = {0}, n, h, k = 0, j = 0, sum = 0, i;
  cin >> n >> h;
  for (i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    if (a[0] < a[i]) a[0] = a[i];
  }
  sort(b, b + i, greater<int>());
  while (1) {
    if (sum >= h) break;
    if (b[k] >= a[0]) {
      sum += b[k];
      k++;
    } else {
      sum += a[0];
      j++;
    }
  }
  cout << k + j << endl;
  return 0;
}
