#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
int n, h; cin >> n >> h;
vector<int> a(n), b(n); 
for (int i = 0; i < n; ++i) cin >> a[i] >> b[i];
sort(begin(a), end(a));
sort(begin(b), end(b));
int ans = 1e9, sum = 0;
for (int i = 0; i < n; ++i) sum += b[n-1-i], ans = min(ans,  i+1 + max(0, (h - sum + a[n-1] - 1) / a[n-1]));
cout << ans << endl;
}