#include <bits/stdc++.h>
int main() {
  int N = 0;
  int H = 0;
  std::cin >> N >> H;
  std::vector<int> a;
  std::vector<int> b;
  for (int i = 0; i < N; i++) {
    int aBuffer = 0;
    int bBuffer = 0;
    std::cin >> aBuffer >> bBuffer;
    a.push_back(aBuffer);
    b.push_back(bBuffer);
  }
  std::sort(a.begin(), a.end());
  std::sort(b.begin(), b.end());
  int iCount = 0;
  int cnt = 0;
  for (int i = 0; i < N; i++) {
    iCount += b[N - 1 - i];
    cnt++;
    if (iCount >= H) {
      std::cout << cnt << std::endl;
      return 0;
    }
  }
  while (true) {
    iCount += a[N - 1];
    cnt++;
    if (iCount >= H) {
      std::cout << cnt << std::endl;
      return 0;
    }
  }
  return 0;
}
