#include <bits/stdc++.h>
using namespace std;
static const int INF = 0x3f3f3f3f;
static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
struct comp {
  bool operator()(const pair<int, int>& lhs, const pair<int, int>& rhs) const {
    return lhs.second < rhs.second;
  }
};
int main() {
  vector<pair<int, int> > A;
  multiset<int> S;
  int n, k;
  scanf("%d %d", &n, &k);
  ;
  for (int i = 0; i < n; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    ;
    A.push_back({a, b});
    S.insert(a);
  }
  long long ans = INFL;
  sort((A).begin(), (A).end(), comp());
  long long sum = 0ll;
  reverse((A).begin(), (A).end());
  long long x = 1ll;
  for (auto a : A) {
    long long temp = 1ll * k - 1ll * sum - 1ll * a.second;
    long long cost = INFL;
    if (temp > 0)
      cost = temp / (1ll * (*S.rbegin())) + 1ll * x;
    else
      cost = 1ll * x;
    x++;
    if (temp > 0ll && (1ll * temp) % (1ll * (*S.rbegin())) != 0) cost++;
    ans = min(cost, ans);
    S.erase(S.find(a.first));
    sum += (1ll * a.second);
  }
  cout << ans << endl;
  return 0;
}
