#include <bits/stdc++.h>
using namespace std;
inline void logger() { cout << endl; }
template <typename A, typename... B>
void logger(const A& a, const B&... b) {
  cout << a << " , ";
  logger(b...);
}
const long long MOD = 1000000007;
const long long MOD9 = 998244353;
const long long INF = MOD * MOD;
const int MAX = 100005;
int main() {
  long long n, h;
  cin >> n >> h;
  vector<long long> vec;
  long long max_a = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    int a, b;
    cin >> a >> b;
    vec.push_back(b);
    if (a > max_a) max_a = a;
  }
  vector<long long> ved;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (vec[i] >= max_a) ved.push_back(vec[i]);
  }
  sort((ved).begin(), (ved).end(), greater<long long>());
  int v_max = ved.size();
  for (int(i) = 0; (i) < (v_max - 1); (i)++) {
    ved[i + 1] += ved[i];
  }
  long long s = 1, t = 1e9;
  while (t - s > 1) {
    long long mid = (s + t) / 2;
    long long x = 0;
    if (mid <= v_max)
      x = ved[mid - 1];
    else
      x = ved[v_max - 1] + max_a * (mid - v_max);
    if (x >= h)
      t = mid;
    else
      s = mid;
  }
  cout << (t) << endl;
}
