def gs() gets.chomp end
def gi() gets.to_i end
def gsmi() gets.chomp.split.map(&:to_i) end
def debug(k,v) puts "#{k}: #{v}" end
def desc(ar) ar.sort!{|x,y|y<=>x} end
def min(a,b) a<=b ? a : b end
def max(a,b) a>=b ? a : b end
def sum(ar) ar.inject(:+) end

#$stdin = File.open('input.txt')
n,@k = gsmi#10**5, 10**9
@as = gets.chomp.split.map(&:to_f)

def ok(l)
  cnt = 0
  @as.each do |a|
    cnt += (a/l).ceil
    cnt -= 1
  end
  cnt <= @k
end

min, max = 0, 10**9
while max!=min
  mid = (min+max)/2
  if ok(mid)
    max = mid
  else
    min = mid+1
  end
end
puts max
