#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, h, a[100010], b[100010];
  cin >> n >> h;
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  long long sum = 0;
  int bmin = 1 << 30;
  for (int i = 0; i < n; i++) {
    sum += b[i];
    bmin = min(bmin, b[i]);
  }
  long long ans = 1 << 30;
  int amax = 0, tt = 0;
  for (int i = 0; i < n; i++) {
    long long t = ceil(1.0 * (h - sum) / a[i]);
    ans = min(ans, t + n);
    amax = max(amax, a[i]);
    tt += a[i] / bmin;
  }
  cout << ans - tt << endl;
  return 0;
}
