#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, y;
} a[100105];
long long n, h, ans, cnt;
bool cmp(const node& a, const node& b) {
  if (a.y == b.y)
    return a.x > b.x;
  else
    return a.y > b.y;
}
int main() {
  scanf("%lld%lld", &n, &h);
  for (int i = 1; i <= n; i++) scanf("%lld%lld", &a[i].x, &a[i].y);
  sort(a + 1, a + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    ans += a[i].y;
    if (ans >= h) {
      printf("%lld", i);
      return 0;
    }
  }
  cnt = n;
  while (ans < h) {
    ans += a[1].x;
    cnt++;
  }
  printf("%lld", cnt);
  return 0;
}
