#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long b = 0, f = 0, g = 0, c, d, q = 0, w = 0;
  long long a;
  cin >> a >> d;
  for (long long i = 0; i < a; i++) {
    cin >> c >> b;
    if (d >= 0) w++;
    d -= b;
    g = max(g, c);
  }
  if (d >= 0) {
    q = d / g;
  }
  cout << q + f + w << "\n";
}
