#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return f * x;
}
int POW(int a, int b, int c) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % c;
    a = (a * a) % c;
    b >>= 1;
  }
  return ans % c;
}
struct node {
  int x, y;
};
node s[10010];
int cmp(node x, node y) { return x.x > y.x; }
int main() {
  std::ios::sync_with_stdio(false);
  int n = read(), m = read();
  for (int i = 1; i <= 2 * n; i += 2) {
    s[i].x = read();
    s[i + 1].y = 1;
    s[i + 1].x = read();
  }
  int ans = 0;
  sort(s + 1, s + 2 * n + 1, cmp);
  for (int i = 1; i <= 2 * n; i++) {
    if (s[i].y == 1) {
      m = m - s[i].x;
      ans++;
    } else {
      if (m % s[i].x == 0) {
        cout << ans + m / s[i].x;
      } else
        cout << ans + 1 + m / s[i].x;
      return 0;
    }
    if (m <= 0) {
      cout << ans;
      return 0;
    }
  }
}
