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

l = 0
r = 10**9

while (r-l > 1)
    x = (r+l)/2

    cnt = 0 
    for i in 0...n
        cnt += (a[i]-1) / x
        break if cnt > k
    end

    if(cnt <= k)
        r = x
    else
        l = x
    end
end

puts r
