lines = []
while line = gets
    lines << line.chomp.split(' ').map(&:to_i)
end

N = lines[0][0]
K = lines[0][1]

a_max = 10 ** 9
a_min = 1
a_current = a_max
searching = true
twice = false

while searching do
  num_cut = 0
  for i in 1..N do
    num_cut += (lines[1][i-1] - 1) / a_current
  end
  if num_cut <= K then   #safe!
    a_max = a_current
    a_current = (a_min + a_max) / 2
  else  #out!
    a_min = a_current
    a_current = (a_min + a_max) / 2
  end
  if a_min + 1 == a_max or a_max == 1 then
    if twice then
      searching = false
      ans = a_max
    else
      twice = true
    end
  end
end
    
puts ans