#include <bits/stdc++.h>
using namespace std;
inline void normal(long long &a) {
  a %= 1000000007;
  (a < 0) && (a += 1000000007);
}
inline long long modMul(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  return (a * b) % 1000000007;
}
inline long long modAdd(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  return (a + b) % 1000000007;
}
inline long long modSub(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  a -= b;
  normal(a);
  return a;
}
inline long long modPow(long long b, long long p) {
  long long r = 1;
  while (p) {
    if (p & 1) r = modMul(r, b);
    b = modMul(b, b);
    p >>= 1;
  }
  return r;
}
inline long long modInverse(long long a) { return modPow(a, 1000000007 - 2); }
inline long long modDiv(long long a, long long b) {
  return modMul(a, modInverse(b));
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  long long n, h;
  cin >> n >> h;
  vector<long long> a(n), b(n);
  vector<pair<long long, long long> > c;
  vector<long long> sum(n + 1);
  sum[0] = 0;
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i] >> b[i];
    c.push_back(make_pair(b[i], a[i]));
  }
  sort((c).begin(), (c).end());
  reverse((c).begin(), (c).end());
  long long m = 0;
  for (int i = 0; i < (int)(n); i++) {
    m = max(m, a[i]);
  }
  for (int i = 0; i < (int)(n); i++) {
    sum[i + 1] = sum[i] + max(m, c[i].first);
    if (sum[i + 1] > h) {
      cout << i + 1;
      return 0;
    }
  }
  long long ans = n;
  while (sum[n] < h) {
    ans++;
    sum[n] += m;
  }
  cout << ans;
}
