#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, H;
  cin >> N >> H;
  long long sumab = 0;
  vector<long long> a(N);
  vector<long long> b(N);
  for (int i = 0; i < N; i++) {
    cin >> a.at(i) >> b.at(i);
    sumab += a.at(i);
    sumab += b.at(i);
  }
  if (sumab >= H) {
    vector<long long> c(N * 2);
    for (int i = 0; i < N; i++) {
      c.at(i) = a.at(i);
    }
    for (int i = 0; i < N; i++) {
      c.at(i + N) = b.at(i);
    }
    sort(c.begin(), c.end());
    reverse(c.begin(), c.end());
    long long sumAB = 0;
    for (int i = 0; i < N * 2; i++) {
      sumAB += c.at(i);
      if (sumAB >= H) {
        cout << i + 1 << endl;
        return 0;
      }
    }
  }
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(b.begin(), b.end());
  long long A = a.at(0);
  long long countb = 0;
  long long sumB = 0;
  for (int i = 0; i < N; i++) {
    if (b.at(i) > A) {
      countb++;
      sumB += b.at(i);
    } else {
      break;
    }
  }
  cout << (H - sumB + A - 1) / A + countb << endl;
}
