#include <bits/stdc++.h>
using namespace std;
struct num {
  unsigned long long a;
  unsigned long long b;
};
num nu[100005] = {0};
unsigned long long qkpow(unsigned long long x, unsigned long long n) {
  unsigned long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * x;
    x = x * x;
    n >>= 1;
  }
  return res;
}
int main(void) {
  int n, h;
  cin >> n >> h;
  unsigned long long sum = 0;
  int i, j;
  for (i = 0; i < n; i++) {
    cin >> nu[i].a >> nu[i].b;
  }
  sort(nu, nu + n, [](num x, num y) {
    if (x.b > y.b)
      return true;
    else if (x.b == y.b && x.a > y.a)
      return true;
    return false;
  });
  for (i = 0; i < n; i++) {
    sum += nu[i].b;
    if (sum >= h) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  unsigned long long ans = 10000000000;
  for (i = n - 1; i >= 0; i--) {
    sum -= nu[i + 1].b;
    unsigned long long temp = (h - sum) / nu[i].a;
    if ((h - sum) % nu[i].a != 0) temp++;
    ans = min(ans, temp + (i + 1));
  }
  cout << ans << endl;
  return 0;
}
