N, K = map(int, input().split())
A = [int(i) for i in input().split()]
l = 0
r = 10 ** 9 + 1
while l + 1 < r:
    p = (l + r) // 2
    n = 0
    ok = False
    for v in A:
        n += (v // p - 1)
        if not v % p == 0:
            n += 1
        if n > K:
            break
    else:
        ok = True
    if not ok:
        l = p
    else:
        r = p

print(r)
 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()] l = 0 l 0 r = 10 ** 9 + 1 r 10 ** 9 + 1 10 ** 9 10 9 1 while l + 1 < r:
    p = (l + r) // 2
    n = 0
    ok = False
    for v in A:
        n += (v // p - 1)
        if not v % p == 0:
            n += 1
        if n > K:
            break
    else:
        ok = True
    if not ok:
        l = p
    else:
        r = p l + 1 < r l + 1 l 1 r p = (l + r) // 2 p (l + r) // 2 l + r l r 2 n = 0 n 0 ok = False ok False for v in A:
        n += (v // p - 1)
        if not v % p == 0:
            n += 1
        if n > K:
            break
    else:
        ok = True
     v A n += (v // p - 1) n v // p - 1 v // p v p 1 if not v % p == 0:
            n += 1
         not v % p == 0 v % p == 0 v % p v p 0 n += 1 n 1 if n > K:
            break
     n > K n K break ok = True ok True if not ok:
        l = p
    else:
        r = p not ok ok l = p l p r = p r p print(r) print r l = 0 0 l p = (l + r) // 2 (l + r) // 2 p ok = True True ok A = [int(i) for i in input().split()] [int(i) for i in input().split()] A K = map(int, input().split()) map(int, input().split()) K n += 1 1 n l = p p l r = 10 ** 9 + 1 10 ** 9 + 1 r r = p p r n += (v // p - 1) v // p - 1 n ok = False False ok n = 0 0 n 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()]
l = 0
r = 10 ** 9 + 1
while l + 1 < r:
    p = (l + r) // 2
    n = 0
    ok = False
    for v in A:
        n += (v // p - 1)
        if not v % p == 0:
            n += 1
        if n > K:
            break
    else:
        ok = True
    if not ok:
        l = p
    else:
        r = p

print(r)

