#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, c = 0, tmp, tmp2, maxa = 0;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &tmp2, &tmp);
    m -= tmp;
    c++;
    if (m < 0) {
      printf("%d", c);
      return 0;
    }
    maxa = max(maxa, tmp2);
  }
  if (m % maxa == 0)
    c += m / maxa;
  else
    c += (m / maxa) + 1;
  printf("%d", c);
  return 0;
}
