#include <bits/stdc++.h>
using namespace std;
void gen_sosuu(int sosuu[]) {
  for (int i = 0; i < (int)(100010); i++) {
    sosuu[i] = true;
  }
  sosuu[0] = false;
  sosuu[1] = false;
  sosuu[2] = true;
  for (int i = (2); i < (int)(sqrt(100000) + 1); i++) {
    if (sosuu[i] == false) continue;
    for (int j = 2; i * j <= 100000; j++) {
      sosuu[i * j] = false;
    }
  }
}
bool comp(pair<int, int> lhs, pair<int, int> rhs) {
  return lhs.first > rhs.first;
}
int n, h;
vector<pair<int, int> > a;
vector<pair<int, int> > b;
int main() {
  scanf("%d %d", &n, &h);
  for (int i = 0; i < (int)(n); i++) {
    int k;
    scanf("%d", &k);
    a.push_back(pair<int, int>(k, i));
    scanf("%d", &k);
    b.push_back(pair<int, int>(k, i));
  }
  sort(a.begin(), a.end(), comp);
  sort(b.begin(), b.end(), comp);
  int cnt = 0;
  while (h > 0) {
    if (a[0].first >= b[0].first) {
      h -= a[0].first;
    } else {
      h -= b[0].first;
      b.erase(b.begin());
    }
    cnt++;
  }
  printf("%d\n", cnt);
}
