#include <bits/stdc++.h>
using namespace std;
long long d1[4] = {1, -1, 0, 0};
long long d2[4] = {0, 0, 1, -1};
int main() {
  long long N, H;
  cin >> N >> H;
  vector<pair<long long, long long>> p(N);
  long long mxa = 0;
  for (long long i = (0); i < (long long)(N); i++) {
    cin >> p[i].second >> p[i].first;
    mxa = max(mxa, p[i].second);
  }
  sort((p).begin(), (p).end(), greater<pair<long long, long long>>());
  cerr << "foo" << endl;
  vector<long long> sum;
  long long i = 0, now = 0;
  while (p[i].first > mxa && i < N) {
    sum.push_back(now + p[i].first);
    now += p[i].first;
    i++;
  }
  cerr << "hoge" << endl;
  long long r = sum.size();
  long long L = 0, R = 1e9 + 1;
  while (R - L > 1) {
    long long M = L + (R - L) / 2;
    long long mx;
    if (M <= r) {
      mx = sum[M - 1];
    } else {
      mx = sum[r - 1] + mxa * (M - r);
    }
    if (mx >= H)
      R = M;
    else
      L = M;
  }
  cout << R << endl;
  return 0;
}
