#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, sum = 0, n, m;
  cin >> n >> m;
  long long ar[n], br[n], cr[n];
  for (i = 0; i < n; i++) cin >> ar[i] >> br[i];
  sort(ar, ar + n);
  sort(br, br + n);
  int r = lower_bound(br, br + n, ar[n - 1]) - br;
  if (r == n)
    r = n - 1;
  else {
    for (i = r; i < n; i++) sum = sum + br[i];
    long long res = n - r;
    if (sum >= m)
      cout << res << endl;
    else {
      long long nm = m - sum;
      int p = nm / ar[n - 1];
      if (p * ar[n - 1] + sum < m)
        cout << p + res + 1 << endl;
      else
        cout << p + res << endl;
    }
  }
  return 0;
}
