#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vb = vector<bool>;
using vs = vector<string>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using pib = pair<int, bool>;
using vpib = vector<pair<int, bool>>;
template <typename T>
void say(T s) {
  cout << s << endl;
}
int main() {
  int N, H;
  int a, b;
  int ans = 0;
  vpib v;
  cin >> N >> H;
  while (cin >> a >> b) {
    v.push_back({a, false});
    v.push_back({b, true});
  }
  sort(v.begin(), v.end(), greater<pair<int, bool>>());
  auto itr = v.begin();
  while (H > 0) {
    H -= (*itr).first;
    if ((*itr).second) ++itr;
    ++ans;
  }
  say(ans);
}
