#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1000000;
long long n, m, k, h, bsum = 0, amax = 0;
long long maxm, minm;
pair<long long, long long> red[MAX_N], blue[MAX_N];
long long a[MAX_N], b[MAX_N], c[MAX_N], d[MAX_N], t[MAX_N];
long long s1[MAX_N], s2[MAX_N];
long long solve() {
  long long count = 0;
  sort(b, b + n);
  reverse(b, b + n);
  int ii = 0;
  while (h > 0) {
    int tt = max(amax, b[ii]);
    if (tt == b[ii]) ii++;
    h -= tt;
    count++;
  }
  return count;
}
int main() {
  cin >> n >> h;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    bsum += b[i];
    amax = max(a[i], amax);
  }
  cout << solve() << endl;
  return 0;
}
