#include <bits/stdc++.h>
const int INF = 1001001000;
const int MOD = (int)1e9 + 7;
using ll = long long;
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int n;
int h;
vector<int> a, b;
bool f(long long int x) {
  long long int sum = 0;
  long long int j = 0;
  if (n <= x) {
    for (int i = 0; i < n; ++i) {
      if (b[i] < a[0]) {
        ++j;
      } else {
        sum += b[i];
      }
    }
    sum += a[0] * (x - n + j);
  } else {
    for (int i = 0; i < x; ++i) {
      sum += b[i];
    }
  }
  return sum >= h;
}
int main() {
  cin >> n >> h;
  a.resize(n);
  b.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i] >> b[i];
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  reverse(a.begin(), a.end());
  reverse(b.begin(), b.end());
  long long int l = 0;
  long long int r = INF * 10000;
  long long int mid;
  long long int ans;
  while (l != r) {
    mid = (l + r) / 2;
    if (f(mid)) {
      ans = mid;
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  long long int tmp = ans;
  long long int tmp1;
  for (int i = 0; i < 10000; ++i) {
    if (f(tmp - i)) {
      tmp1 = tmp - i;
    }
  }
  ans = tmp1;
  cout << ans << endl;
}
