#include <bits/stdc++.h>
int main() {
  int n, m, i, num = 0, c = 0, sum = 0;
  scanf("%d %d", &n, &m);
  int tho[n + 1], wield[n + 1];
  for (i = 0; i < n; i++) {
    scanf("%d %d", &tho[i], &wield[i]);
    if (num < tho[i]) num = tho[i];
  }
  for (i = 0; i < n; i++) {
    if (num < wield[i]) {
      sum += wield[i];
      c++;
      if (sum >= m) {
        printf("%d\n", c);
        break;
      }
    }
  }
  printf("sum=%d  c=%d\n", sum, c);
  if (sum < m) {
    sum = m - sum;
    c += sum / num;
    if (sum % num != 0) c++;
    printf("%d\n", c);
  }
  return 0;
}
