#include <bits/stdc++.h>
int compare_l(const void *p, const void *q) {
  return *(long long *)p - *(long long *)q;
}
int main() {
  long long h, x = 0, z = 0;
  int n, i, max = 0, sum = 0;
  scanf("%d %lld", &n, &h);
  long long a[n], b[n];
  for (i = 0; i <= n - 1; i++) {
    scanf("%lld %lld", &a[i], &b[i]);
    if (max < a[i]) max = a[i];
  }
  qsort((void *)b, n, sizeof(b[0]), compare_l);
  for (i = n - 1; i >= 0; i--) {
    x += b[i];
    if (x >= h) {
      printf("%d", n - i - 1);
    }
  }
  for (i = 0; i <= n - 1; i++) {
    if (max < b[i]) {
      sum += b[i];
      z++;
    }
  }
  while (1) {
    if (sum >= h) {
      printf("%lld", z);
      return 0;
    }
    h -= max;
    z++;
  }
}
