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