#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int H;
  cin >> H;
  int a[N], b[N];
  int sword_sum = 0;
  int a_max = -1;
  int max_turn = -1;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (a[i] > a_max) a_max = a[i];
    cin >> b[i];
    sword_sum += b[i];
  }
  for (int i = 0; i < N; i++) {
    if (b[i] < a_max) sword_sum -= b[i];
    b[i] = 0;
  }
  int sword_sum_temp = sword_sum;
  if (sword_sum >= H) {
    sort(b, b + N);
    max_turn = N;
    for (int i = 0; i < N; i++) {
      sword_sum_temp -= b[i];
      if (sword_sum_temp < H) break;
      max_turn--;
    }
  } else {
    if (a_max == 1)
      max_turn = N + (H - sword_sum) / a_max;
    else
      max_turn = N + (H - sword_sum + 1) / a_max;
  }
  cout << max_turn << endl;
  return 0;
}
