#include <bits/stdc++.h>
using namespace std;
long long int n, cnt = 0, ans = 0, a[100000], b[100000], c, cmp[100000],
                 data[100000], m, h, x, y, bsum, bsumm = 0;
string s, w;
int main(void) {
  cin >> n >> h;
  for (long long int(i) = 0; (i) < (int)(n); (i)++) {
    cin >> a[i] >> b[i];
    bsumm += b[i];
  }
  c = h - bsumm;
  sort(a, a + n);
  reverse(a, a + n);
  sort(b, b + n);
  reverse(b, b + n);
  if (bsumm >= h) {
    for (long long int(i) = 0; (i) < (int)(n); (i)++) {
      bsum += b[i];
      cnt++;
      if (bsum >= h) {
        cout << cnt << endl;
        return 0;
      }
    }
  }
  while (1) {
    for (long long int(i) = 0; (i) < (int)(n); (i)++) {
      if (b[i] <= a[0]) {
        x += a[0];
        ans++;
      } else {
        bsum += b[i];
        cnt++;
        b[i] = 0;
      }
      if (x + bsum >= h) {
        cout << ans + cnt << endl;
        return 0;
      }
    }
  }
  return 0;
}
