#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
}
int n, m, ans, y[10005], mx;
int main() {
  read(n);
  read(m);
  for (int i = 1; i <= n; i++) {
    int x;
    read(x);
    mx = mx > x ? mx : x;
    read(y[i]);
  }
  sort(y + 1, y + n + 1);
  for (int i = n; i; i--) {
    m -= y[i];
    if (m < 0) {
      cout << n - i + 1 << "\n";
      return 0;
    }
  }
  ans = n + m / mx;
  cout << ans << "\n";
}
