from math import ceil
n,k = map(int,input().split())
a = list(map(int,input().split()))

def cut(x):
  t = 0
  for i in a:
    if i <= x:
      continue
    t += ceil(i / x) - 1
  return t <= k

l,r=0,10**9
while l+1 < r:
  x = l + (r-l)//2
  if cut(x):
    r = x
  else:
    l = x
print(r) from math import ceil n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k a = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def cut(x):
  t = 0
  for i in a:
    if i <= x:
      continue
    t += ceil(i / x) - 1
  return t <= k cut t = 0 t 0 for i in a:
    if i <= x:
      continue
    t += ceil(i / x) - 1
   i a if i <= x:
      continue
     i <= x i x continue t += ceil(i / x) - 1 t ceil(i / x) - 1 ceil(i / x) ceil i / x i x 1 return t <= k t <= k t k x x l,r=0,10**9 l 0 r 10**9 10 9 while l+1 < r:
  x = l + (r-l)//2
  if cut(x):
    r = x
  else:
    l = x l+1 < r l+1 l 1 r x = l + (r-l)//2 x l + (r-l)//2 l (r-l)//2 r-l r l 2 if cut(x):
    r = x
  else:
    l = x cut(x) cut x r = x r x l = x l x print(r) print r l,r=0,10**9 0 l r = x x r n,k = map(int,input().split()) map(int,input().split()) n k = map(int,input().split()) map(int,input().split()) k a = list(map(int,input().split())) list(map(int,input().split())) a x = l + (r-l)//2 l + (r-l)//2 x r=0,10**9 10**9 r l = x x l def cut(x):
  t = 0
  for i in a:
    if i <= x:
      continue
    t += ceil(i / x) - 1
  return t <= k def cut(x):
  t = 0
  for i in a:
    if i <= x:
      continue
    t += ceil(i / x) - 1
  return t <= k cut
from math import ceil
n,k = map(int,input().split())
a = list(map(int,input().split()))

def cut(x):
  t = 0
  for i in a:
    if i <= x:
      continue
    t += ceil(i / x) - 1
  return t <= k

l,r=0,10**9
while l+1 < r:
  x = l + (r-l)//2
  if cut(x):
    r = x
  else:
    l = x
print(r)