#include <bits/stdc++.h>
using namespace std;
int n, h, a[10001], b[10001], mx, t, i, c, m, s;
int main() {
  cin >> n >> h;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    mx = max(a[i], mx);
    s += b[i];
    if (s > h) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << n + (h - s) / mx + ((h - s) % mx > 0) << endl;
}
