local mmi, mma = math.min, math.max
local mfl, mce = math.floor, math.ceil
local n, k = io.read("*n", "*n")
local t = {}
for i = 1, n do
  t[i] = io.read("*n")
end
local function solve(x)
  local c = 0
  for i = 1, n do
    c = c + mma(0, mce(t[i] / x) - 1)
  end
  return c <= k
end
local min, max = 0, 1000000000
while 1 < max - min do
  local mid = mfl((min + max) / 2)
  if solve(mid) then
    max = mid
  else
    min = mid
  end
end
print(max)
