#include <bits/stdc++.h>
using namespace std;
bool compare_inverse(pair<int, int> a, pair<int, int> b) {
  return a.first > b.first;
}
int main() {
  int n, h;
  cin >> n >> h;
  int a[n], b[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  vector<pair<int, int>> attack(2 * n);
  for (int i = 0; i < n; i++) {
    attack[i] = make_pair(a[i], 0);
  }
  for (int i = 0; i < n; i++) {
    attack[i + n] = make_pair(b[i], 1);
  }
  sort(attack.begin(), attack.end(), compare_inverse);
  int technique_num = 0;
  int ans = 0;
  while (h > 0) {
    h -= attack[technique_num].first;
    if (attack[technique_num].second == 1) technique_num += 1;
    ans += 1;
  }
  cout << ans << endl;
  return 0;
}
