#include <bits/stdc++.h>
using namespace std;
int N;
int a[10000];
int b[10000];
int main() {
  int H, x, y, n, can, m, cnt, d;
  cin >> N >> H;
  for (int i = int(0); i < int(N); ++i) {
    cin >> a[i] >> b[i];
  }
  cnt = m = n = d = 0;
  can = N;
  while (H > 0) {
    cout << "H:" << H << endl;
    cout << "ab:" << a[0] << b[0] << endl;
    if (can == 1) {
      for (int i = int(0); i < int(N); ++i)
        if (a[i] != -1) d = i;
      H -= b[d];
      cnt += H / a[d] + ((H / a[d] > 0) ? 1 : 0);
      H = 0;
    }
    for (int i = int(0); i < int(N); ++i) {
      x = 0;
      if (a[i] == -1) continue;
      if (a[i] > x) {
        x = a[i];
        n = i;
      } else if (a[i] == x) {
        if (b[i] > b[n]) {
          x = a[i];
          n = i;
        }
      }
    }
    for (int i = int(0); i < int(N); ++i) {
      y = 0;
      if (b[i] == -1) continue;
      if (b[i] > y) {
        y = a[i];
        m = i;
      }
    }
    if (a[n] == -1 && b[m] == -1) {
      break;
    } else if (H - b[m] < 0 || (a[n] < b[m] && can > 1)) {
      H -= b[m];
      a[m] = b[m] = -1;
      --can;
    } else {
      H -= a[n];
    }
    ++cnt;
  }
  cout << cnt << endl;
  return 0;
}
