#include <iostream>
#include <vector>
#include <algorithm>
typedef std::pair<unsigned int ,unsigned int > P;

int main(){
    long n, h;
    std::cin >> n >> h;
    int a[100010], b[100010];
    std::vector<P> vec;
    P max = std::make_pair(-1, -1);
    for(int i = 0; i < n; i++){
        int t1, t2;
        std::cin >> t1 >> t2;
        if(max.first < t1){
            max = std::make_pair(t1, t2);
        }else if (max.first == t1) {
            max.second = std::max(max.second, t2);
        }
        vec.push_back(std::make_pair(t1, t2));
    }
    std::sort(vec.begin(), vec.end(), [](P a, P b){
        return a.second < b.second;
    });
    int i = 0;
    do{
        P back = vec.back();
        if(back.first == max.first && back.second == max.second){
            vec.pop_back();
            continue;
        }
        if(back.second <= max.first){
            if(h <= max.second){
                h -= max.second;
                vec.pop_back();
                i++;
                break;
            }
            else{
                h -= max.first;
                i++;
                continue;
            }
        }else{
            h -= back.second;
            vec.pop_back();
            i++;
        }

    }while(h > 0);
    std::cout << i << std::endl;
}
