#include <bits/stdc++.h>
using namespace std;

typedef long long LL;

#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define ALL(x) (x).begin(),(x).end()
const int IINF = 1e9;
const LL LINF = 1e18;
const LL mod = 1e9+7;

int main() {
    LL N, H;
    cin >> N >> H;
    vector<LL> a(N);
    vector<LL> b(N);
    REP(i, N) {
        cin >> a[i] >> b[i];
    }
    LL A = *max_element(ALL(a));
    sort(ALL(b), greater<LL>());
    LL t = 0;
    LL res = (H + A - 1)/A;
    REP(i, N) {
        t += b[i];
        LL c = i + 1 + (H - t + A - 1)/A;
        res = max(min(res, c), 0);
    }
    cout << res << endl;
    return 0;
}
