#include <bits/stdc++.h>
using namespace std;
const double g = 10.0, eps = 1e-12;
const int N = 200000 + 10, maxn = 200000 + 10, inf = 0x3f3f3f3f;
struct point {
  point(int _x = 0, int _y = 0) { x = _x, y = _y; }
  int x, y;
  bool operator<(const point& rhm) const { return x < rhm.x; }
} p[N];
priority_queue<point> Q;
int main() {
  int n, h;
  scanf("%d%d", &n, &h);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    Q.push(point(x, 1));
    Q.push(point(y, 2));
  }
  int ans = 0;
  while (h > 0) {
    point cur = Q.top();
    if (cur.y == 2) Q.pop();
    h -= cur.x;
    ans++;
  }
  printf("%d\n", ans);
  return 0;
}
