#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
struct node {
  int x, y;
} p[maxn];
int n;
long long num;
bool cmp(node a, node b) { return a.y > b.y; }
bool cmp1(node a, node b) { return a.x < b.x; }
int main() {
  cin >> n >> num;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &p[i].x, &p[i].y);
    sum += p[i].y;
  }
  if (sum >= num) {
    sort(p + 1, p + 1 + n, cmp);
    int pos;
    for (int i = 1; i <= n; i++) {
      sum -= p[i].y;
      if (sum <= 0) {
        pos = i;
        break;
      }
    }
    cout << pos << endl;
  } else {
    sort(p + 1, p + 1 + n, cmp);
    num -= sum;
    int tt;
    tt = num / p[n].x;
    tt += n;
    if (num % p[n].x == 0)
      cout << tt << endl;
    else
      cout << tt + 1 << endl;
  }
}
