# 2butan renshuu 0812

def f(m):
  cut=0
  for aa in a:
    cut+=(aa-1)//m
    if cut > k:
      return False
  return True

n,k=map(int,input().split())
a=list(map(int,input().split()))

l=0
r=10**9+1
while r-l>1:
  m=(l+r)//2
  # right move
  if f(m):
    r=m
  else:
    l=m

print(r) def f(m):
  cut=0
  for aa in a:
    cut+=(aa-1)//m
    if cut > k:
      return False
  return True f cut=0 cut 0 for aa in a:
    cut+=(aa-1)//m
    if cut > k:
      return False
   aa a cut+=(aa-1)//m cut (aa-1)//m aa-1 aa 1 m if cut > k:
      return False
   cut > k cut k return False False return True True m m 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 l=0 l 0 r=10**9+1 r 10**9+1 10**9 10 9 1 while r-l>1:
  m=(l+r)//2
  # right move
  if f(m):
    r=m
  else:
    l=m r-l>1 r-l r l 1 m=(l+r)//2 m (l+r)//2 l+r l r 2 if f(m):
    r=m
  else:
    l=m f(m) f m r=m r m l=m l m print(r) print r m=(l+r)//2 (l+r)//2 m l=m m l a=list(map(int,input().split())) list(map(int,input().split())) a def f(m):
  cut=0
  for aa in a:
    cut+=(aa-1)//m
    if cut > k:
      return False
  return True def f(m):
  cut=0
  for aa in a:
    cut+=(aa-1)//m
    if cut > k:
      return False
  return True f r=10**9+1 10**9+1 r l=0 0 l n,k=map(int,input().split()) map(int,input().split()) n r=m m r k=map(int,input().split()) map(int,input().split()) k
# 2butan renshuu 0812

def f(m):
  cut=0
  for aa in a:
    cut+=(aa-1)//m
    if cut > k:
      return False
  return True

n,k=map(int,input().split())
a=list(map(int,input().split()))

l=0
r=10**9+1
while r-l>1:
  m=(l+r)//2
  # right move
  if f(m):
    r=m
  else:
    l=m

print(r)
