#include <bits/stdc++.h>
using namespace std;
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
struct Matrix {
  vector<vector<int>> data;
  int r, c;
  Matrix(int row, int col, bool identity = false) : r(row), c(col) {
    data.assign(row, vector<int>(col, 0));
    if (identity) {
      for (int i = 0; i < r; ++i) {
        data[i][i] = 1;
      }
    }
  }
  Matrix operator*(Matrix &other) {
    int m = r, n = c, p = other.c;
    Matrix res(m, p);
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < p; ++j) {
        for (int k = 0; k < n; ++k) {
          res.data[i][j] += data[i][k] * other.data[k][j];
        }
      }
    }
    return res;
  }
};
vector<int> extendGcd(int a, int b) {
  if (b == 0) {
    return {a, 1, 0};
  } else {
    vector<int> tmp = extendGcd(b, a % b);
    return {tmp[0], tmp[2], tmp[1] - (a / b) * tmp[2]};
  }
}
Matrix matrix_power(Matrix base, long long exp) {
  int n = base.r;
  Matrix res(n, n, true);
  while (exp) {
    if (exp & 1) {
      res = res * base;
    }
    base = base * base;
    exp >>= 1;
  }
  return res;
}
template <typename T>
T power_mod(T base, int exp, int mod = 1000000007) {
  T res = 1;
  while (exp) {
    if (exp & 1) res = res * base % mod;
    base = base * base % mod;
    exp >>= 1;
  }
  return res;
}
template <typename T>
T power(T base, int exp) {
  T res = 1;
  while (exp) {
    if (exp & 1) res *= base;
    base *= base;
    exp >>= 1;
  }
  return res;
}
long long inv(long long a) { return power_mod(a, 1000000007 - 2); }
int n, h;
int a[100010], b[100010];
int main() {
  cin >> n >> h;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", a + i, b + i);
  }
  auto cmp = [](vector<int> u, vector<int> v) {
    return u[0] < v[0] || (u[0] == v[0] && u[1] < v[1]);
  };
  priority_queue<vector<int>, vector<vector<int>>, decltype(cmp)> pq(cmp);
  for (int i = 0; i < n; ++i) {
    pq.push({a[i], 1, i});
    pq.push({b[i], 0, i});
  }
  int sum = 0;
  bool used[100010];
  memset(used, 0, sizeof(used));
  int res = 0;
  vector<int> bar;
  while (!pq.empty() && sum < h) {
    vector<int> tmp = pq.top();
    pq.pop();
    if (used[tmp[2]]) continue;
    ++res;
    sum += tmp[0];
    bar.push_back(tmp[0]);
    if (tmp[1]) {
      int remain = h - sum;
      int foo = (remain + tmp[0] - 1) / tmp[0];
      cout << res + foo;
      return 0;
    } else {
      used[tmp[2]] = true;
    }
  }
  if (sum >= h) {
    cout << res;
  } else {
    reverse((bar).begin(), (bar).end());
    sort(a, a + n);
    auto it = lower_bound((bar).begin(), (bar).end(), a[n - 1]);
    if (it == bar.begin()) {
      int remain = h - sum;
      int foo = (remain + a[n - 1] - 1) / a[n - 1];
      cout << res + foo;
    } else {
      --it;
      while (it != bar.begin()) {
        sum -= *it;
        --res;
        --it;
      }
      sum -= *it;
      --res;
      int remain = h - sum;
      int foo = (remain + a[n - 1] - 1) / a[n - 1];
      cout << res + foo;
    }
  }
  return 0;
}
