def max(a, b); a < b ? b : a; end
def min(a, b); a < b ? a : b; end
def divceil(a, b); (a + b - 1) / b; end

class Problem
  attr_accessor *(?a..?z).to_a.map(&:to_sym)

  def initialize
    @n,@k = gets.to_s.split.map{ |v| v.to_i }
    @a = gets.to_s.split.map{ |v| v.to_i }
  end

  def solve
    lo = 0
    hi = 10**10
    (lo..hi).bsearch do |x|
      query(x)
    end
  end

  def query(x)
    cutnum(x) <= k
  end

  def cutnum(x)
    a.map{ divceil(_1, x) - 1 }.sum
  end

  def show(ans)
    puts ans
  end
end

Problem.new.instance_eval do
  show(solve)
end

