#include <bits/stdc++.h>
using namespace std;
 
#define rep(i,n) for(long long (i)=0;(i)<(n);(i)++)
#define ll long long
#define pr_qu priority_queue
#define vec(name,size,common) vector<ll> (name)((size),(common))
 
 
 
 
 
int main(){
  ll n,h;
  cin>>n>>h;

  set<ll> a;
  vector<ll> b(n);
ll va;
  for(ll i=0;i<n;i++){
    cin>>va>>b.at(i);
    a.insert(va);
  }

  sort(b.begin(),b.end(),greater<ll>());

  ll co=0,sum=0;
    while(h>0){
      if(*rbegin(a)>=b.at(co)){
        h -= *rbegin(a);
        sum++;
      }else{
        h -= b.at(co);
        b.at(co) = 0;
        co++;
        sum++;
        if(co>=b.size()){
          co = 0;
        }
      }
    }
    cout<<sum<<endl;
    
}