#include <bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
//using namespace __gnu_pbds;

#define ll  long long
#define PR  pair<int, int>

const int N = 3e5 + 10;
const int MOD = 1e9 + 7;
const long long INF = 5e18;
const double PI = 2 * acos(0.0);
//template<typename T> using ordered_set = tree<T, nulong long_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

ll a[N], b[N];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n, h;
    cin >> n >> h;
    for (int i = 1; i <= n; i++) {
        cin >> a[i] >> b[i];
    }
    sort(a + 1, a + n + 1, greater<ll>());
    sort(b + 1, b + n + 1, greater<ll>());
    ll ans = INF, L = 0, R = 1e9;
    while (L <= R) {
        ll mid = L + R >> 1;
        ll red = mid * a[1];
        ll now = h - red;
        if (now <= 0) {
            R = mid - 1;
            ans = tmp;
            continue;
        }
        ll tmp = mid;
        for (int i = 1; i <= n; i++) {
            if (now <= 0) {
                break;
            }
            now -= b[i];
            tmp++;
        }
        if (now <= 0) {
            R = mid - 1;
            ans = tmp;
        } else {
            L = mid + 1;
        }
    }
    cout << ans << '\n';
    return 0;
}
