#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, H;
  int a[100000] = {}, b[100000] = {}, s = 0, sum = 0, cnt = 0, cn2 = 0;
  cin >> N >> H;
  for (int i = 0; i < N; i++) cin >> a[i] >> b[i];
  sort(&a[0], &a[N - 1]);
  sort(&b[0], &b[N - 1]);
  for (int i = N - 1; i >= 0 && b[i] >= a[N - 1]; i--, cn2++) s += b[i];
  while (1) {
    sum += a[N - 1];
    if (sum > H - s) break;
    cnt++;
  }
  if (N == 1) cnt++;
  cout << cnt + cn2 << endl;
  return 0;
}
