#include <bits/stdc++.h>
using namespace std;
int n, s, a[100005], b[100005], sum;
int main() {
  cin >> n >> s;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
    sum += b[i];
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + n + 1);
  if (s >= sum) {
    int ans = n + (s - sum) / a[n] + ((s - sum) % a[n] != 0);
    sum = 0;
    int i = n;
    while (i) {
      sum += b[i];
      ans = min(ans, n - i + 1 + (s - sum) / a[n] + ((s - sum) % a[n] != 0));
      i--;
    }
    cout << ans;
  } else {
    int ans = 0, i = n;
    while (s > 0) {
      s -= b[i];
      i--;
      ans++;
    }
    cout << ans;
  }
  system("pause");
}
