#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  long long a[100005], b[100005];
  while (scanf("%lld%lld", &n, &m) == 2) {
    long long sum = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%lld%lld", &a[i], &b[i]);
      sum += b[i];
    }
    sort(a + 1, a + 1 + n);
    sort(b + 1, b + 1 + n);
    if (sum >= m) {
      int sum1 = m;
      int i = n, j = 0;
      while (sum1) {
        sum1 -= b[i];
        j++;
      }
      printf("%d\n", j);
    } else {
      int sum2 = m - sum;
      int cou = 0;
      if (sum2 % a[n] == 0) {
        cou = sum2 / a[n];
      } else {
        cou = sum2 / a[n] + 1;
      }
      sum2 = m - cou * a[n];
      int i = n, j = 0;
      while (sum2) {
        sum -= b[i];
        j++;
      }
      printf("%d\n", cou + j);
    }
  }
  return 0;
}
