#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, h;
  cin >> n >> h;
  vector<int> a(n), b(n);
  int amax = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i] >> b[i];
    amax = max(amax, a[i]);
  }
  sort(b.rbegin(), b.rend());
  int bmin;
  for (bmin = 0; bmin < n; ++bmin) {
    if (b[bmin] <= amax) {
      break;
    }
  }
  int l = 0, r = h;
  while (l + 1 < r) {
    int mid = (l + r) / 2;
    int rest = h;
    int i;
    for (i = 0; i < min(bmin, mid); ++i) {
      rest -= b[i];
    }
    rest -= amax * (mid - i);
    if (rest <= 0) {
      r = mid;
    } else {
      l = mid;
    }
  }
  cout << r << "\n";
}
