#include<bits/stdc++.h>

int main(){
    using namespace std;

    unsigned long N, H;
    cin >> N >> H;

    vector<unsigned long> A(N), B(N);
    for(unsigned long i{0}; i < N; ++i)cin >> A[i] >> B[i];
    swap(*begin(A), *max_element(begin(A), end(A)));
    auto it = partition(begin(B), end(B), [&A](const auto& i){return i > A[0];});
    if(accumulate(begin(B), it, 0UL) < H){
        cout << it - begin(B) + (H - accumulate(begin(B), it, 0UL) + A[0] - 1) / A[0] << endl;
    }else{
        sort(begin(B), it, greater<>());
        unsigned long tmp{0};
        for(unsigned long i{0}; i < N; ++i)if((tmp += B[i]) >= H)cout << i + 1 << endl;
    }
    return 0;
}