n, k = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)

l = 1
r = a.max
while l < r
    m = (l + r) / 2

    sum = 0
    a.each {|e| sum += (e.fdiv(m) - 1).ceil}
    sum > k ? l = m + 1 : r = m
end

p l