N, K = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
s = A.max

l, r = 1, s

while l <= r
  m = l + (r - l) / 2
  mk = A.map{|v| (v / (m + 0.0)).ceil - 1}.sum
  # pp [l,r,m,mk]
  if mk > K then
    l = m + 1
  else
    r = m - 1
  end
end

puts l
