#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define all(a) a.begin(),a.end()
#define F first
#define S second
#define pb push_back
#define ll long long
#define ld long double
#define mkp make_pair
#define sz(x) (int)x.size()
#define pi pair<long long, long long>
#define endl '\n'
#define _ << ' '
#define FAST_LOG2(x) (sizeof(unsigned long)*8 - 1 - __builtin_clzl((unsigned long)(x)))
#define clog2(x) (((x) - (1 << FAST_LOG2(x))) ? FAST_LOG2(x) + 1 : FAST_LOG2(x))
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> idxset;
//find_by_order(i) : iterator to the value at index i, order_of_key(x) : the index of value x
const ll mod = (ll)1e9+7;
const ll INF = (ll)1e9+1;

pair<ll, ll> a[100001];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    #ifndef ONLINE_JUDGE

    #endif
    ll n, h, mx=0, nmx=0, ans=0;
    cin >> n >> h;
    for(int i=0; i<n; i++)
    {
        cin >> a[i].S >> a[i].F;
        if(a[i].S>mx)
        {
            mx = a[i].S;
            nmx = 1;
        }
        else if(a[i].S==mx) nmx++;
    }
    sort(a, a+n);
    for(int i=n-1; i>=0; i--)
    {
        bool ok=0;
        if(mx<=a[i].F) ok = 1;
        if(a[i].S!=mx&&ok)
        {
            h -= a[i].F;
            ans++;
            if(h<1)
            {
                cout << ans;
                return 0;
            }
        }
        else
        {
            if(!ok)
            {
                ans += (h+a[i].S-1)/a[i].S;
                cout << ans;
                return 0;
            }
            if(nmx>1)
            {
                nmx--;
                h-=a[i].F;
                ans++;
                if(h<=0)
                {
                    cout << ans;
                    return 0;
                }
            }
            else
            {
                h-=a[i].F;
                if(h<=0)
                {
                    cout << ans+1;
                    return 0;
                }
                ans += (h+a[i].S-1)/a[i].S;
                cout << ans+1;
                return 0;
            }
        }
    }
}

