import sys
input=sys.stdin.readline
n,k=map(int,input().split())
l=list(map(int,input().split()))
ok=max(l)
ng=0
def solve(m):
    s=0
    for i in l:
        s+=-((-i)//m)-1
    return s

while ok-ng>1:
    m=(ok+ng)//2
    if k<solve(m):
        ng=m
    else:
        ok=m
print(ok) import sys sys input=sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k l=list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ok=max(l) ok max(l) max l ng=0 ng 0 def solve(m):
    s=0
    for i in l:
        s+=-((-i)//m)-1
    return s solve s=0 s 0 for i in l:
        s+=-((-i)//m)-1
     i l s+=-((-i)//m)-1 s -((-i)//m)-1 -((-i)//m) (-i)//m -i i m 1 return s s m m while ok-ng>1:
    m=(ok+ng)//2
    if k<solve(m):
        ng=m
    else:
        ok=m ok-ng>1 ok-ng ok ng 1 m=(ok+ng)//2 m (ok+ng)//2 ok+ng ok ng 2 if k<solve(m):
        ng=m
    else:
        ok=m k<solve(m) k solve(m) solve m ng=m ng m ok=m ok m print(ok) print ok ok=max(l) max(l) ok ng=0 0 ng m=(ok+ng)//2 (ok+ng)//2 m input=sys.stdin.readline sys.stdin.readline input ng=m m ng ok=m m ok l=list(map(int,input().split())) list(map(int,input().split())) l n,k=map(int,input().split()) map(int,input().split()) n k=map(int,input().split()) map(int,input().split()) k def solve(m):
    s=0
    for i in l:
        s+=-((-i)//m)-1
    return s def solve(m):
    s=0
    for i in l:
        s+=-((-i)//m)-1
    return s solve
import sys
input=sys.stdin.readline
n,k=map(int,input().split())
l=list(map(int,input().split()))
ok=max(l)
ng=0
def solve(m):
    s=0
    for i in l:
        s+=-((-i)//m)-1
    return s

while ok-ng>1:
    m=(ok+ng)//2
    if k<solve(m):
        ng=m
    else:
        ok=m
print(ok)