def main():
  l,r=0,10**9
  while r-l>1:
    m=(l+r)//2
    if sum([(i-1)//m for i in a])<=k: r=m;
    else: l=m;
  print(r)

if __name__=='__main__':
  n,k=map(int,input().split())
  a=list(map(int,input().split()))
  main() def main():
  l,r=0,10**9
  while r-l>1:
    m=(l+r)//2
    if sum([(i-1)//m for i in a])<=k: r=m;
    else: l=m;
  print(r) main l,r=0,10**9 l 0 r 10**9 10 9 while r-l>1:
    m=(l+r)//2
    if sum([(i-1)//m for i in a])<=k: 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 (i-1)//m for i in a for i in a i a for i in a (i-1)//m i-1 i 1 m if sum([(i-1)//m for i in a])<=k: r=m;
    else: l=m;
   sum([(i-1)//m for i in a])<=k sum([(i-1)//m for i in a]) sum [(i-1)//m for i in a] k print(r) print r if __name__=='__main__':
  n,k=map(int,input().split())
  a=list(map(int,input().split()))
  main() __name__=='__main__' __name__ '__main__' 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 main() main def main():
  l,r=0,10**9
  while r-l>1:
    m=(l+r)//2
    if sum([(i-1)//m for i in a])<=k: r=m;
    else: l=m;
  print(r) def main():
  l,r=0,10**9
  while r-l>1:
    m=(l+r)//2
    if sum([(i-1)//m for i in a])<=k: r=m;
    else: l=m;
  print(r) main k=map(int,input().split()) map(int,input().split()) k n,k=map(int,input().split()) map(int,input().split()) n a=list(map(int,input().split())) list(map(int,input().split())) a
def main():
  l,r=0,10**9
  while r-l>1:
    m=(l+r)//2
    if sum([(i-1)//m for i in a])<=k: r=m;
    else: l=m;
  print(r)

if __name__=='__main__':
  n,k=map(int,input().split())
  a=list(map(int,input().split()))
  main()