#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n, h;
  cin >> n >> h;
  int a[n], b[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i] >> b[i];
  }
  sort(a, a + n);
  sort(b, b + n);
  ll sum = 0;
  for (int i = n - 1; i >= 0; --i) {
    sum += (ll)b[i];
    if (sum >= h) {
      cout << n - i << '\n';
      return 0;
    }
  }
  int count = (int)2e9;
  for (int i = 0; i < n; ++i) {
    ll tmp_sum = sum - b[i];
    count = min(count, n - 1 + (int)ceil((h - tmp_sum) / a[i]));
  }
  cout << count << '\n';
  return 0;
}
