#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, h;
  cin >> n >> h;
  using P = pair<int, int>;
  vector<P> s(n);
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    s[i].first = b;
    s[i].second = a;
  }
  sort(s.begin(), s.end(), greater<P>());
  int cu = 0;
  int cupos = 0;
  for (int i = 0; i < n; i++) {
    if (cu <= s[i].second) {
      cu = s[i].second;
      cupos = i;
    }
  }
  int ans = 0;
  for (int i = 0; i <= cupos; i++) {
    h -= s[i].first;
    ans++;
    if (h <= 0) {
      cout << ans << endl;
      return 0;
    }
  }
  while (true) {
    if (h <= s[cupos].second) {
      ans++;
      cout << ans << endl;
      return 0;
    } else {
      h -= s[cupos].second;
      ans++;
    }
  }
}
