#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const int MOD = 1e9 + 7;
const long long INF = 1e18;
const long long inf = 1e9;
const double pi = acos(-1);
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, -1, 1, 1, -1};
const int MAX = 510000;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n, h;
  cin >> n >> h;
  vector<long long> a(n), b(n);
  for (long long i = 0; i < (long long)(n); ++i) cin >> a[i] >> b[i];
  sort(a.begin(), a.end(), greater<long long>());
  sort(b.begin(), b.end(), greater<long long>());
  vector<long long> s(n + 1);
  long long num = 0;
  for (long long i = 0; i < (long long)(n); ++i) {
    if (b[i] > a[0]) {
      s[i + 1] = s[i] + b[i];
      num++;
    } else
      break;
  }
  long long ok = INF + 1, ng = 0;
  while (abs(ok - ng) > 1) {
    long long mid = (ok + ng) / 2;
    if (mid <= num) {
      if (s[mid] < h)
        ng = mid;
      else
        ok = mid;
    } else {
      if (s[num] + (mid - num) * a[0] < h)
        ng = mid;
      else
        ok = mid;
    }
  }
  cout << ok << endl;
  return 0;
}
