#include <bits/stdc++.h>
bool attempt(std::map<int, int> &as, std::map<int, int> &bs, int damage,
             int round, int target);
int main() {
  std::map<int, int> as;
  std::map<int, int> bs;
  int n, h;
  std::cin >> n;
  std::cin >> h;
  for (auto i = 0; i < n; i++) {
    int a, b;
    std::cin >> a;
    std::cin >> b;
    as[i] = a;
    bs[i] = b;
  }
  attempt(as, bs, 0, 0, h);
  return 0;
}
bool attempt(std::map<int, int> &as, std::map<int, int> &bs, int damage,
             int round, int target) {
  int huri = 0;
  int nage = 0;
  int nage_i;
  for (auto i = 0; i < bs.size(); i++) {
    if (nage < bs[i]) {
      nage = bs[i];
      nage_i = i;
    }
    if (huri < as[i]) {
      huri = as[i];
    }
  }
  std::map<int, int> next_as(as);
  std::map<int, int> next_bs(bs);
  next_as.erase(nage_i);
  next_bs.erase(nage_i);
  if (damage + nage >= target) {
    std::cout << (round + 1) << std::endl;
    return true;
  }
  if (damage + huri >= target) {
    std::cout << (round + 1) << std::endl;
    return true;
  }
  if (!attempt(next_as, next_bs, damage + nage, round + 1, target))
    return attempt(as, bs, damage + huri, round + 1, target);
}
