#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using IP = pair<int, int>;
const ll linf = 1LL << 62;
const int inf = 99999999;
const int dx[4] = {1, 0, -1, 0};
const int sy[4] = {0, 1, 0, -1};
ll gcd(ll a, ll b) {
  if (a % b == 0)
    return b;
  else
    gcd(b, a % b);
}
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
ll a[100010], b[100010], n, h;
ll dfs(ll i, ll h) {
  if (i >= n) return linf;
  if (h <= 0) return 0;
  return min(dfs(i, h - a[i]) + 1, dfs(i + 1, h - b[i]) + 1);
}
int main() {
  cin >> n >> h;
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  cout << dfs(0, h) - 1 << endl;
  return 0;
}
