#include<iostream>
#include<set>
using namespace std;

int n,h,a,b,b_max,c=0;
set<int> x,y;

int main(){
	cin>>n>>h;
	for(int i=0;i<n;i++){
		cin>>a>>b;
		x.insert(a);
		y.insert(b);
		if(a==*(x.end())) {b_max=b; y.erase(b);}
	}

	for(set<int>::iterator it=y.end();*it>=*(x.end());it--){
		if(h<=b_max||(h<=*(x.end()))){ break;}
		h-=*it;
		c++;
	}

	do{
		if(h<=b_max||(h<=*(x.end()))){c++; break;}
		h-=*(x.end());
		c++;
	}

	cout<<c<<endl;

	return 0;
}