#include <bits/stdc++.h>
using namespace std;
inline void in(int &s) {
  s = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    s = (s << 1) + (s << 3) + c - '0';
    c = getchar();
  }
}
int n, m, ans, x, z, s[100002];
long long sum;
bool ok = 1;
bool cmp(int a, int b) { return a > b; }
int main() {
  in(n);
  in(m);
  for (int i = 0; i < n; ++i) {
    in(x);
    in(s[i]);
    z = max(x, z);
  }
  sort(s, s + n, cmp);
  for (int i = 0; i < n; ++i) {
    sum += s[i];
    if (sum >= m) {
      printf("%d\n", i + 1);
      ok = 0;
      break;
    }
  }
  if (ok) {
    ans = n;
    m -= sum;
    if (m % z == 0)
      ans += m / z;
    else
      ans += m / z + 1;
    printf("%d\n", ans);
  }
  return 0;
}
