#include <bits/stdc++.h>
using namespace std;
struct katana_t {
  bool operator<(const katana_t& right) const {
    return (a < b ? b : a) < (right.a < right.b ? right.b : right.a);
  }
  int a;
  int b;
};
int main(void) {
  int n, h;
  cin >> n >> h;
  list<katana_t> katanas;
  katana_t t;
  unsigned long long int ans = 0;
  for (size_t i = 0; i < n; i++) {
    scanf("%d %d", &(t.a), &(t.b));
    katanas.push_back(t);
  }
  katanas.sort();
  do {
    t = katanas.back();
    if (katanas.size() == 1) {
      if (h <= t.b) {
        h -= t.b;
      } else {
        h -= t.a;
      }
    } else {
      h -= max(t.a, t.b);
      katanas.pop_back();
    }
    ans++;
  } while (h > 0);
  cout << ans << endl;
  return 0;
}
