#include <bits/stdc++.h>
using namespace std;
int N, H;
vector<pair<int, int> > v;
vector<int> ans;
void dfs(int n, int count, int h) {
  if (h <= 0) {
    ans.push_back(count);
    return;
  }
  if (n >= N) {
    return;
  }
  dfs(n, count + 1, h - v[n].second);
  dfs(n + 1, count + 1, h - v[n].first);
}
int main() {
  scanf("%d %d", &N, &H);
  pair<int, int> p;
  for (int i = 0; i < N; ++i) {
    scanf("%d %d", &p.second, &p.first);
    v.push_back(p);
  }
  sort(v.begin(), v.end(), greater<pair<int, int> >());
  dfs(0, 0, H);
  printf("%d\n", *min_element(ans.begin(), ans.end()));
  return 0;
}
