#include <bits/stdc++.h>
int main() {
  int n, h;
  std::cin >> n >> h;
  int a[100010], b[100010];
  std::vector<std::pair<int, int> > vec;
  std::pair<int, int> max = std::make_pair(-1, -1);
  for (int i = 0; i < n; i++) {
    int t1, t2;
    std::cin >> t1 >> t2;
    if (max.first < t1) {
      max = std::make_pair(t1, t2);
    } else if (max.first == t1) {
      max.second = std::max(max.second, t2);
    }
    vec.push_back(std::make_pair(t1, t2));
  }
  std::sort(vec.begin(), vec.end(),
            [](std::pair<int, int> a, std::pair<int, int> b) {
              return a.second < b.second;
            });
  int i = 0;
  do {
    std::pair<int, int> back = vec.back();
    if (back.first == max.first && back.second == max.second) {
      vec.pop_back();
      continue;
    }
    if (back.second <= max.first) {
      if (h <= max.second) {
        h -= max.second;
        vec.pop_back();
        i++;
        break;
      } else {
        h -= max.first;
        i++;
        continue;
      }
    } else {
      h -= back.second;
      vec.pop_back();
      i++;
    }
  } while (h > 0);
  std::cout << i << std::endl;
}
