#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, h;
  cin >> n >> h;
  vector<int> a(n), b(n);
  for (int i = 0; i < (int)(n); ++i) {
    cin >> a[i] >> b[i];
  }
  sort((b).begin(), (b).end());
  vector<long long> bsum(n, 0);
  bsum[0] = 0;
  bsum[1] = b[0];
  for (int i = 2; i <= n; i++) {
    bsum[i] = bsum[i - 1] + b[i - 1];
  }
  long long ans = 1e9;
  cerr << bsum[n] << endl;
  if (bsum[n] >= h) {
    ans = n;
    for (int i = 0; i < n; i++) {
      long long sum = bsum[n] - bsum[i];
      if (sum > h) ans = min(ans, (long long)n - i - 1);
    }
  }
  for (int i = 0; i < n; i++) {
    int cnt = b.end() - lower_bound((b).begin(), (b).end(), a[i]);
    long long throw_dmg = bsum[n] - bsum[n - cnt];
    cerr << cnt << " " << a[i] << " " << throw_dmg << endl;
    long long t_ans = cnt + ((h - throw_dmg) + (a[i] - 1)) / a[i];
    ans = min(ans, t_ans);
  }
  cout << ans << endl;
}
