#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e+15 + 7;
long long n, m, l;
string s, t;
long long d[100000], dp[100][100];
long long a[100000], b[100000];
int main() {
  vector<long long> a, b;
  int bsize = 0;
  cin >> n >> m;
  for (long long i = (0); i < (n); i++) {
    long long x, y;
    cin >> x >> y;
    a.push_back(x);
    b.push_back(y);
  }
  bsize = n - 1;
  while (m > 0) {
    sort((a).begin(), (a).end(), greater<int>());
    sort((b).begin(), (b).end(), greater<int>());
    if (m <= 0) break;
    if (bsize <= 0) {
      l += m / a[0];
      m = -1;
      break;
    }
    if (a[0] < b[0]) {
      m -= b[0];
      b[0] = -1;
      bsize--;
    } else
      m -= a[0];
    l++;
  }
  cout << (l) << endl;
  return 0;
}
