#include <bits/stdc++.h>
using namespace std;
struct katana {
  int w, t;
} v[10002];
struct ura {
  int dmg;
  bool tip;
} k[20005];
bool cmpw(katana a, katana b) {
  if (a.w > b.w) return 1;
  return 0;
}
bool cmpt(katana a, katana b) {
  if (a.t > b.t) return 1;
  return 0;
}
bool cmpf(ura a, ura b) {
  if (a.dmg > b.dmg) return 1;
  return 0;
}
int main() {
  int n, h;
  int i;
  cin >> n >> h;
  long long s = 0;
  for (i = 1; i <= n; i++) cin >> v[i].w >> v[i].t, s = s + v[i].t;
  if (h == s) {
    cout << n;
    return 0;
  }
  if (h < s) {
    sort(v + 1, v + n + 1, cmpt);
    i = 1;
    while (h > 0) {
      h -= v[i].t;
      i++;
    }
    cout << i - 1;
    return 0;
  }
  if (h > s) {
    sort(v + 1, v + n + 1, cmpw);
    int cnt = 0;
    int x = h - s;
    cnt = x / v[1].w + (x % v[1].w != 0);
    h = h - cnt * v[1].w;
    int nn = 0;
    for (i = 1; i <= n; i++) {
      k[++nn].dmg = v[i].w;
      k[nn].tip = 0;
      k[++nn].dmg = v[i].t;
      k[nn].tip = 1;
    }
    sort(k + 1, k + nn + 1, cmpf);
    i = 1;
    while (h > 0) {
      h -= k[i].dmg;
      if (k[i].tip == 1) i++;
      cnt++;
    }
    cout << cnt;
  }
  return 0;
}
