'''
Date         : 2020-08-09 00:46:52
Author       : ssyze
Description  : 
'''
n, k = map(int, input().split())
a = list(map(int, input().split()))


def check(m):
    sum = 0
    for i in range(len(a)):
        sum += (a[i] - 1) // m
    if sum > k:
        return False
    else:
        return True


l = 1
r = 10**9
ans = 10**9
while l < r:
    mid = (l + r) // 2
    if check(mid) == 1:
        r = mid
        ans = mid
    else:
        l = mid + 1
print(ans) '''
Date         : 2020-08-09 00:46:52
Author       : ssyze
Description  : 
''' 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):
    sum = 0
    for i in range(len(a)):
        sum += (a[i] - 1) // m
    if sum > k:
        return False
    else:
        return True check sum = 0 sum 0 for i in range(len(a)):
        sum += (a[i] - 1) // m
     i range(len(a)) range len(a) len a sum += (a[i] - 1) // m sum (a[i] - 1) // m a[i] - 1 a[i] a i 1 m if sum > k:
        return False
    else:
        return True sum > k sum k return False False return True True m m l = 1 l 1 r = 10**9 r 10**9 10 9 ans = 10**9 ans 10**9 10 9 while l < r:
    mid = (l + r) // 2
    if check(mid) == 1:
        r = mid
        ans = mid
    else:
        l = mid + 1 l < r l r mid = (l + r) // 2 mid (l + r) // 2 l + r l r 2 if check(mid) == 1:
        r = mid
        ans = mid
    else:
        l = mid + 1 check(mid) == 1 check(mid) check mid 1 r = mid r mid ans = mid ans mid l = mid + 1 l mid + 1 mid 1 print(ans) print ans l = 1 1 l l = mid + 1 mid + 1 l r = 10**9 10**9 r r = mid mid r ans = mid mid ans n, k = map(int, input().split()) map(int, input().split()) n ans = 10**9 10**9 ans mid = (l + r) // 2 (l + r) // 2 mid def check(m):
    sum = 0
    for i in range(len(a)):
        sum += (a[i] - 1) // m
    if sum > k:
        return False
    else:
        return True def check(m):
    sum = 0
    for i in range(len(a)):
        sum += (a[i] - 1) // m
    if sum > k:
        return False
    else:
        return True check a = list(map(int, input().split())) list(map(int, input().split())) a k = map(int, input().split()) map(int, input().split()) k
'''
Date         : 2020-08-09 00:46:52
Author       : ssyze
Description  : 
'''
n, k = map(int, input().split())
a = list(map(int, input().split()))


def check(m):
    sum = 0
    for i in range(len(a)):
        sum += (a[i] - 1) // m
    if sum > k:
        return False
    else:
        return True


l = 1
r = 10**9
ans = 10**9
while l < r:
    mid = (l + r) // 2
    if check(mid) == 1:
        r = mid
        ans = mid
    else:
        l = mid + 1
print(ans)
