class Problem
  attr_accessor :a, :b, :n, :h

  def initialize
    @n, @h = gets.to_s.split.map { |v| v.to_i }
    @a, @b = Array.new(@n) { gets.to_s.split.map { |v| v.to_i } }.transpose
    @ans = 10 ** 10
  end

  def solve
    throws.each_with_index do |hit, t|
      cnt = div_ceil(h - hit, swing) + t
      chmin(cnt)
    end
    puts @ans
  end
  
  def throws
    @throws ||= b.sort.reverse.each_with_object([0]) { |v, h| h << h[-1] + v }
  end

  def swing
    @swing ||= a.max
  end

  def div_ceil(a,b)
    (a + b - 1) / b
  end

  def chmin(cnt)
    @ans = cnt if cnt < @ans
  end
end

pr = Problem.new
pr.solve
