#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9 + 1;
const ll LINF = (long long)1e18 + 1;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll N, H;
  std::cin >> N >> H;
  vector<pair<ll, ll>> s_a;
  vector<ll> s_b;
  for (decltype(N) i = 0; i < N; i++) {
    ll a, b;
    std::cin >> a >> b;
    s_a.emplace_back(a, b);
    s_b.emplace_back(b);
  }
  std::sort(s_a.begin(), s_a.end());
  std::sort(s_b.begin(), s_b.end());
  vector<ll> sum_s_b(1, 0);
  for (decltype(N) i = 0; i < N; i++) {
    sum_s_b.push_back(sum_s_b.back() + s_b[N - i - 1]);
  }
  ll ans = LINF;
  for (decltype(N) i = 0; i < N; i++) {
    auto itr = lower_bound(s_b.begin(), s_b.end(), s_a[i].second);
    auto index = N - distance(s_b.begin(), itr) - 1;
    ll cnt =
        min(ceil(max((H - sum_s_b[index]), 0LL) / (double)s_a[i].first) + index,
            ceil(max((H - sum_s_b[index] - s_a[i].second), 0LL) /
                 (double)s_a[i].first) +
                index + 1);
    ans = min(ans, cnt);
  }
  std::cout << ans << std::endl;
  return 0;
}
