N, K = map(int, input().split())
A = [int(i) for i in input().split()]

def f(length, ls):
    cur = 0
    for a in ls:
        if a%length == 0:
            cur += a//length - 1
        else:
            cur += a//length
    if cur <= K:
        return True
    else:
        return False

ok, ng = max(A), 0
while abs(ok - ng) > 1:
    z = (ok+ng)//2
    if f(z, A) == True:
        ok = z
    else:
        ng = z
print(ok) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A = [int(i) for i in input().split()] A [int(i) for i in input().split()] def f(length, ls):
    cur = 0
    for a in ls:
        if a%length == 0:
            cur += a//length - 1
        else:
            cur += a//length
    if cur <= K:
        return True
    else:
        return False f cur = 0 cur 0 for a in ls:
        if a%length == 0:
            cur += a//length - 1
        else:
            cur += a//length
     a ls if a%length == 0:
            cur += a//length - 1
        else:
            cur += a//length
     a%length == 0 a%length a length 0 cur += a//length - 1 cur a//length - 1 a//length a length 1 cur += a//length cur a//length a length if cur <= K:
        return True
    else:
        return False cur <= K cur K return True True return False False length length ls ls ok, ng = max(A), 0 ok max(A) max A ng 0 while abs(ok - ng) > 1:
    z = (ok+ng)//2
    if f(z, A) == True:
        ok = z
    else:
        ng = z abs(ok - ng) > 1 abs(ok - ng) abs ok - ng ok ng 1 z = (ok+ng)//2 z (ok+ng)//2 ok+ng ok ng 2 if f(z, A) == True:
        ok = z
    else:
        ng = z f(z, A) == True f(z, A) f z A True ok = z ok z ng = z ng z print(ok) print ok z = (ok+ng)//2 (ok+ng)//2 z ok, ng = max(A), 0 max(A) ok ng = z z ng A = [int(i) for i in input().split()] [int(i) for i in input().split()] A def f(length, ls):
    cur = 0
    for a in ls:
        if a%length == 0:
            cur += a//length - 1
        else:
            cur += a//length
    if cur <= K:
        return True
    else:
        return False def f(length, ls):
    cur = 0
    for a in ls:
        if a%length == 0:
            cur += a//length - 1
        else:
            cur += a//length
    if cur <= K:
        return True
    else:
        return False f ng = max(A), 0 0 ng K = map(int, input().split()) map(int, input().split()) K ok = z z ok N, K = map(int, input().split()) map(int, input().split()) N
N, K = map(int, input().split())
A = [int(i) for i in input().split()]

def f(length, ls):
    cur = 0
    for a in ls:
        if a%length == 0:
            cur += a//length - 1
        else:
            cur += a//length
    if cur <= K:
        return True
    else:
        return False

ok, ng = max(A), 0
while abs(ok - ng) > 1:
    z = (ok+ng)//2
    if f(z, A) == True:
        ok = z
    else:
        ng = z
print(ok)