#include <bits/stdc++.h>
using std::sort;
const long long LINF = 0x3FFFFFFFFFFFFFFF;
const int INF = 0x3FFFFFFF;
const int MAXN = 200010;
struct Factory {
  int v, c;
} a[MAXN];
long long m, f[MAXN][2], qs[MAXN];
bool v[MAXN];
int n, qh, qt, q[MAXN];
inline bool FactorySort(const Factory &lhs, const Factory &rhs) {
  return lhs.v != rhs.v ? lhs.v < rhs.v : lhs.c > rhs.c;
}
int removeBadFactory() {
  for (int i = n, c = INF; i; i--)
    if (a[i].c < c) {
      c = a[i].c;
      v[i] = true;
    }
  for (int i = 1; i <= n && a[i].c; i++) v[i] = false;
  for (int i = 1; i <= n; i++)
    if (a[i].c >= m) v[i] = false;
  int p = 0;
  for (int i = 1; i <= n; i++)
    if (v[i]) a[++p] = a[i];
  return p;
}
long long equalAt(const int x, const int y) {
  long long t = (f[x][0] * a[x].v - f[y][0] * a[y].v - f[x][1] + f[y][1]) /
                (a[x].v - a[y].v);
  return (t - f[x][0]) * a[x].v + f[x][1] + 1;
}
void push_to_queue(const int x) {
  if (qh == qt) {
    q[qt++] = x;
    return;
  }
  long long s = equalAt(q[qt - 1], x);
  while (qh < qt && s <= qs[qt - 1]) {
    qt--;
    s = qh == qt ? 0 : equalAt(q[qt - 1], x);
  }
  q[qt] = x;
  qs[qt] = s;
  qt++;
}
int get_at(const long long s) {
  while (qh < qt - 1 && s >= qs[qh + 1]) qh++;
  return qh == qt ? -1 : q[qh];
}
int main() {
  scanf("%d %lld", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d %d", &a[i].v, &a[i].c);
  sort(a + 1, a + n + 1, FactorySort);
  n = removeBadFactory();
  for (int i = 1; i <= n; i++)
    if (a[i].c) f[i][0] = LINF;
  for (int i = 1; i <= n; i++) {
    int j = get_at(a[i].c);
    if (j != -1) {
      f[i][0] = (a[i].c - f[j][1] - 1) / a[j].v + 1 + f[j][0];
      f[i][1] = (f[i][0] - f[j][0]) * a[j].v + f[j][1] - a[i].c;
    }
    if (f[i][0] < LINF) push_to_queue(i);
  }
  int j = get_at(m);
  long long ans = (m - f[j][1] - 1) / a[j].v + 1 + f[j][0];
  printf("%lld\n", ans);
  return 0;
}
