import math
N,K = map(int,input().split())
A = list(map(int,input().split()))

def cut(c):
    t = 0
    for a in A:
        if a<=c:
            continue
        t += math.ceil(a/c) - 1
    return t<=K

l=0
r=10**9
while((l+1)<r):
    c = (l+r)//2
    if cut(c):
        r = c
    else:
        l = c

print(r) import math math 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(c):
    t = 0
    for a in A:
        if a<=c:
            continue
        t += math.ceil(a/c) - 1
    return t<=K cut t = 0 t 0 for a in A:
        if a<=c:
            continue
        t += math.ceil(a/c) - 1
     a A if a<=c:
            continue
         a<=c a c continue t += math.ceil(a/c) - 1 t math.ceil(a/c) - 1 math.ceil(a/c) math.ceil math ceil a/c a c 1 return t<=K t<=K t K c c l=0 l 0 r=10**9 r 10**9 10 9 while((l+1)<r):
    c = (l+r)//2
    if cut(c):
        r = c
    else:
        l = c (l+1)<r l+1 l 1 r c = (l+r)//2 c (l+r)//2 l+r l r 2 if cut(c):
        r = c
    else:
        l = c cut(c) cut c r = c r c l = c l c print(r) print r A = list(map(int,input().split())) list(map(int,input().split())) A def cut(c):
    t = 0
    for a in A:
        if a<=c:
            continue
        t += math.ceil(a/c) - 1
    return t<=K def cut(c):
    t = 0
    for a in A:
        if a<=c:
            continue
        t += math.ceil(a/c) - 1
    return t<=K cut r=10**9 10**9 r r = c c r K = map(int,input().split()) map(int,input().split()) K N,K = map(int,input().split()) map(int,input().split()) N c = (l+r)//2 (l+r)//2 c l=0 0 l l = c c l
import math
N,K = map(int,input().split())
A = list(map(int,input().split()))

def cut(c):
    t = 0
    for a in A:
        if a<=c:
            continue
        t += math.ceil(a/c) - 1
    return t<=K

l=0
r=10**9
while((l+1)<r):
    c = (l+r)//2
    if cut(c):
        r = c
    else:
        l = c

print(r)