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

def check(m):
    n = 0
    for a in A:
        if a%m == 0:
            n += a//m - 1
        else:
            n += a//m
    return n <= K
        

l = 0
r = 10**9+10

while r-l > 1:
    m = (r+l) // 2
    if check(m):
        r = m
    else:
        l = m

print(r)

 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 check(m):
    n = 0
    for a in A:
        if a%m == 0:
            n += a//m - 1
        else:
            n += a//m
    return n <= K
         check n = 0 n 0 for a in A:
        if a%m == 0:
            n += a//m - 1
        else:
            n += a//m
     a A if a%m == 0:
            n += a//m - 1
        else:
            n += a//m
     a%m == 0 a%m a m 0 n += a//m - 1 n a//m - 1 a//m a m 1 n += a//m n a//m a m return n <= K n <= K n K m m l = 0 l 0 r = 10**9+10 r 10**9+10 10**9 10 9 10 while r-l > 1:
    m = (r+l) // 2
    if check(m):
        r = m
    else:
        l = m r-l > 1 r-l r l 1 m = (r+l) // 2 m (r+l) // 2 r+l r l 2 if check(m):
        r = m
    else:
        l = m check(m) check m r = m r m l = m l m print(r) print r K = map(int,input().split()) map(int,input().split()) K A = list(map(int,input().split())) list(map(int,input().split())) A r = m m r r = 10**9+10 10**9+10 r l = m m l N,K = map(int,input().split()) map(int,input().split()) N def check(m):
    n = 0
    for a in A:
        if a%m == 0:
            n += a//m - 1
        else:
            n += a//m
    return n <= K
         def check(m):
    n = 0
    for a in A:
        if a%m == 0:
            n += a//m - 1
        else:
            n += a//m
    return n <= K
         check l = 0 0 l m = (r+l) // 2 (r+l) // 2 m
N,K = map(int,input().split())
A = list(map(int,input().split()))

def check(m):
    n = 0
    for a in A:
        if a%m == 0:
            n += a//m - 1
        else:
            n += a//m
    return n <= K
        

l = 0
r = 10**9+10

while r-l > 1:
    m = (r+l) // 2
    if check(m):
        r = m
    else:
        l = m

print(r)


