#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, H;
  cin >> N >> H;
  int a[N], b[N];
  for (int i = 0; i < N; ++i) cin >> a[i] >> b[i];
  int big = 0;
  int ans = 0;
  for (int i = 0; i < N; ++i) big += max(a[i], b[i]);
  if (big >= H) {
    sort(b, b + N);
    while (H > 0) {
      H -= b[N - ans - 1];
      ans++;
    }
    cout << ans << endl;
  } else {
    sort(a, a + N);
    sort(b, b + N);
    for (int i = 0; i < N; ++i) H -= max(b[i], a[N - 1]);
    ans = (H - 1) / a[N - 1] + 1 + N;
    cout << ans << endl;
  }
  return 0;
}
