#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int H, N, A[100002], B[100002];
bool judge(int a) {
  int sum = 0;
  for (int i = 0; i < a; ++i) {
    if (i < v.size()) {
      sum += v[i];
    } else {
      sum += v[v.size() - 1];
    }
  }
  return (H <= sum);
}
int main() {
  cin >> N >> H;
  int a = 0;
  for (int i = 0; i < N; ++i) {
    cin >> A[i] >> B[i];
    a = max(A[i], a);
  }
  v.push_back(a);
  for (int i = 0; i < N; ++i) {
    if (B[i] > a) {
      v.push_back(B[i]);
    }
  }
  sort(v.begin(), v.end(), greater<int>());
  int r = 0, l = H / A[0] + (H % A[0] != 0);
  while (l - r > 1) {
    int m = (l - r) / 2 + r;
    if (judge(m))
      l = m;
    else
      r = m;
  }
  cout << l << endl;
  return 0;
}
