#include <bits/stdc++.h>
void sort(int ar[], int l, int r);
int main(void) {
  int n, h, i, j, tmp, max = 0, cnt = 0;
  scanf("%d %d", &n, &h);
  int a[n], b[n];
  for (i = 0; i < n; i++) {
    scanf("%d %d", &a[i], &b[i]);
    if (max < a[i]) {
      max = a[i];
    }
  }
  sort(b, 0, n - 1);
  for (i = 0; i < n; i++) {
    printf("%d", b[i]);
  }
  i = 0;
  while (h > 0) {
    if (i < n) {
      if (max >= b[i]) {
        h -= max;
      } else {
        h -= b[i];
        i++;
      }
    } else {
      h -= max;
    }
    cnt++;
  }
  printf("%d", cnt);
  return 0;
}
void sort(int ar[], int l, int r) {
  int piv, i, j, tmp;
  i = l;
  j = r;
  piv = ar[(l + r) / 2];
  while (1) {
    while (piv < ar[i]) {
      i++;
    }
    while (ar[j] < piv) {
      j--;
    }
    if (i >= j) {
      break;
    }
    tmp = ar[i];
    ar[i] = ar[j];
    ar[j] = tmp;
  }
  if (l < i - 1) {
    sort(ar, l, i - 1);
  }
  if (j + 1 < r) {
    sort(ar, j + 1, r);
  }
}
