#include <bits/stdc++.h>
using namespace std;
void d() {
  int n, h;
  cin >> n >> h;
  vector<pair<int, int>> knifes(n);
  vector<int> bs(n);
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    bs[i] = b;
    knifes[i] = {a, b};
  }
  sort(knifes.begin(), knifes.end());
  sort(bs.begin(), bs.end());
  vector<unsigned long long int> dp(n);
  dp[0] = bs.back();
  for (int i = 1; i < n; i++) {
    if (bs[n - i - 1] < knifes.back().first) {
      dp[i] = dp[i - 1] + knifes.back().first;
    } else {
      dp[i] = dp[i - 1] + bs[n - i - 1];
    }
  }
  int l = 1;
  int r = 1000000001;
  int minimum = r;
  while (r - l > 1) {
    int m = (r + l) / 2;
    bool can = false;
    if (m > n) {
      unsigned long long int result = dp[n - 1] + knifes.back().first * (m - n);
      if (result >= h) {
        can = true;
      }
    } else {
      for (int i = 0; i < m; i++) {
        unsigned long long int result =
            dp[i] + knifes.back().first * (m - i - 1);
        if (result >= h) {
          can = true;
          break;
        }
      }
    }
    if (can) {
      r = m;
      minimum = m;
    } else {
      l = m;
    }
  }
  cout << r << endl;
}
int main() {
  d();
  return 0;
}
