#include <bits/stdc++.h>
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF = (long long)1E17;
long mod(long a) {
  long long c = a % (long long)(1E9 + 7);
  if (c >= 0) return c;
  return c + (long long)(1E9 + 7);
}
using namespace std;
bool prime(int n) {
  if (n == 1) {
    return false;
  } else if (n == 2) {
    return true;
  } else {
    for (int i = 2; i <= sqrt(n); i++) {
      if (n % i == 0) {
        return false;
      }
    }
    return true;
  }
}
long long gcd(long long a, long long b) {
  if (a < b) {
    swap(a, b);
  }
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long long lcm(long long x, long long y) { return (x / gcd(x, y)) * y; }
class UnionFind {
 public:
  vector<int> Parent;
  UnionFind(int N) { Parent = vector<int>(N, -1); }
  int root(int A) {
    if (Parent[A] < 0) return A;
    return Parent[A] = root(Parent[A]);
  }
  int size(int A) { return -Parent[root(A)]; }
  bool connect(int A, int B) {
    A = root(A);
    B = root(B);
    if (A == B) {
      return false;
    }
    if (size(A) < size(B)) swap(A, B);
    Parent[A] += Parent[B];
    Parent[B] = A;
    return true;
  }
};
int main() {
  int n, h;
  cin >> n >> h;
  int a[n], b[n];
  int ma = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    if (ma < a[i]) {
      ma = a[i];
    }
  }
  vector<pair<int, int> > nb;
  for (int i = 0; i < n; i++) {
    if (b[i] > ma) {
      nb.push_back(pair<int, int>(b[i], i));
    }
  }
  sort(nb.begin(), nb.end(), greater<pair<int, int> >());
  int cntb = nb.size();
  int sumb[cntb];
  for (int i = 0; i < cntb; i++) {
    if (i == 0) {
      sumb[i] = nb[i].first;
    } else {
      sumb[i] = sumb[i - 1] + nb[i].first;
    }
  }
  int l = 1;
  int r = 1000000010;
  int m, temp, cnt;
  bool flag;
  while (r - l > 1) {
    m = (l + r) / 2;
    if (m <= cntb) {
      if (sumb[m - 1] >= h) {
        r = m + 1;
        if (r - l == 2) {
          l = m;
        }
      } else {
        l = m + 1;
      }
    } else {
      if (((h - sumb[cntb]) + ma - 1) / ma <= (m - cntb)) {
        r = m + 1;
        if (r - l == 2) {
          l = m;
        }
      } else {
        l = m + 1;
      }
    }
  }
  cout << l << endl;
  return 0;
}
