#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[ans];
      ans++;
    }
    cout << ans << endl;
  } else {
    sort(a, a + N);
    ans = H / a[0];
    cout << ans << endl;
  }
  return 0;
}
