import std.functional,
       std.algorithm,
       std.bigint,
       std.string,
       std.traits,
       std.array,
       std.range,
       std.stdio,
       std.conv;

void main() {
  long[] NH = readln.chomp.split.to!(long[]);
  long N = NH[0],
       H = NH[1];
  long[] ks;
  long idx;
  bool[long] isa, isb;
  long ans;

  foreach (_; 0..N) {
    long[] ab = readln.chomp.split.to!(long[]);
    long a = ab[0],
         b = ab[1];
    ks ~= a;
    ks ~= b;

    isa[a] = true;
    isa[b] = false;
    isb[b] = true;
    isb[a] = false;
  }
  ks = ks.sort!"a>b".uniq.array;

  while (H > 0) {
    long k = ks[idx];
    if (isb[k] && !isa[k]) {
      idx++;
      H -= k;
      ans++;
    } else {
      long n = H / k;
      H -= n * k;
      if (H > 0) {
        H -= k;
        n++;
      }
      ans += n;
    }
  }

  writeln(ans);
}
