#include <bits/stdc++.h>
using namespace std;
template <class T>
void umin(T &a, T b) {
  a = min(a, b);
}
template <class T>
void umax(T &a, T b) {
  a = max(a, b);
}
const int dx[] = {1, 0, -1, 0, -1, -1, 1, 1},
          dy[] = {0, 1, 0, -1, -1, 1, -1, 1};
const int mod = 1e9 + 7;
const long long N = 2e6 + 5;
long long n, h, a[N], b[N], mx;
vector<int> d;
bool check(long long x) {
  long long sum = 0;
  for (int i = -1; i < (int)((d).size()); ++i) {
    if (i == -1) {
      if (mx * x >= h) return 1;
    } else {
      sum += d[i];
      if (sum + (x - i - 1) * mx >= h) return 1;
    }
  }
  return 0;
}
void solve() {
  cin >> n >> h;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i] >> b[i];
    umax(mx, a[i]);
  }
  for (int i = 1; i <= n; ++i) {
    if (b[i] > mx) {
      d.push_back(b[i]);
    }
  }
  sort(d.begin(), d.end());
  reverse(d.begin(), d.end());
  long long l = 1, r = (h + mx - 1 / mx), ans = r;
  while (l <= r) {
    long long m = (l + r) >> 1;
    if (check(m)) {
      ans = m;
      r = m - 1;
    } else
      l = m + 1;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  while (T--) solve();
  return 0;
}
