import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


N, K = MI()
A = LMI()

A.sort(reverse=True)

def split_cnt(L):
    cnt = 0
    for a in A:
        if a <= L:
            break
        cnt += -(-a // L) - 1
    return cnt



l = 0
r = A[0]
while l + 1< r:
    mid = (l + r) // 2
    if split_cnt(mid) <= K:
        r = mid
    else:
        l = mid
print(r) import sys sys sys.setrecursionlimit(300000) sys.setrecursionlimit sys setrecursionlimit 300000 def I(): return int(sys.stdin.readline()) I def MI(): return map(int, sys.stdin.readline().split()) MI def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split()) MI0 def LMI(): return list(map(int, sys.stdin.readline().split())) LMI def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split())) LMI0 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 INF = float('inf') INF float('inf') float 'inf' N, K = MI() N MI() MI K A = LMI() A LMI() LMI A.sort(reverse=True) A.sort A sort reverse=True reverse True def split_cnt(L):
    cnt = 0
    for a in A:
        if a <= L:
            break
        cnt += -(-a // L) - 1
    return cnt split_cnt cnt = 0 cnt 0 for a in A:
        if a <= L:
            break
        cnt += -(-a // L) - 1
     a A if a <= L:
            break
         a <= L a L break cnt += -(-a // L) - 1 cnt -(-a // L) - 1 -(-a // L) -a // L -a a L 1 return cnt cnt L L l = 0 l 0 r = A[0] r A[0] A 0 while l + 1< r:
    mid = (l + r) // 2
    if split_cnt(mid) <= K:
        r = mid
    else:
        l = mid l + 1< r l + 1 l 1 r mid = (l + r) // 2 mid (l + r) // 2 l + r l r 2 if split_cnt(mid) <= K:
        r = mid
    else:
        l = mid split_cnt(mid) <= K split_cnt(mid) split_cnt mid K r = mid r mid l = mid l mid print(r) print r l = 0 0 l def LMI(): return list(map(int, sys.stdin.readline().split())) def LMI(): return list(map(int, sys.stdin.readline().split())) LMI N, K = MI() MI() N r = A[0] A[0] r def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split()) def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split()) MI0 mid = (l + r) // 2 (l + r) // 2 mid def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split())) def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split())) LMI0 l = mid mid l def split_cnt(L):
    cnt = 0
    for a in A:
        if a <= L:
            break
        cnt += -(-a // L) - 1
    return cnt def split_cnt(L):
    cnt = 0
    for a in A:
        if a <= L:
            break
        cnt += -(-a // L) - 1
    return cnt split_cnt def MI(): return map(int, sys.stdin.readline().split()) def MI(): return map(int, sys.stdin.readline().split()) MI MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD r = mid mid r def I(): return int(sys.stdin.readline()) def I(): return int(sys.stdin.readline()) I K = MI() MI() K INF = float('inf') float('inf') INF A = LMI() LMI() A
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


N, K = MI()
A = LMI()

A.sort(reverse=True)

def split_cnt(L):
    cnt = 0
    for a in A:
        if a <= L:
            break
        cnt += -(-a // L) - 1
    return cnt



l = 0
r = A[0]
while l + 1< r:
    mid = (l + r) // 2
    if split_cnt(mid) <= K:
        r = mid
    else:
        l = mid
print(r)