import math

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

max_l = max(A) + 1
min_l = 0
cur = (max_l + min_l) // 2


def check(l):
    count = 0
    for a in A:
        count += math.ceil(a / l) - 1

    return count <= K


while True:
    if check(cur):
        max_l = cur + 1
    else:
        min_l = cur

    if cur == (max_l + min_l) // 2:
        break

    cur = (max_l + min_l) // 2

print(cur) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K A = sorted(list(map(int, input().split()))) A sorted(list(map(int, input().split()))) sorted list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split max_l = max(A) + 1 max_l max(A) + 1 max(A) max A 1 min_l = 0 min_l 0 cur = (max_l + min_l) // 2 cur (max_l + min_l) // 2 max_l + min_l max_l min_l 2 def check(l):
    count = 0
    for a in A:
        count += math.ceil(a / l) - 1

    return count <= K check count = 0 count 0 for a in A:
        count += math.ceil(a / l) - 1

     a A count += math.ceil(a / l) - 1 count math.ceil(a / l) - 1 math.ceil(a / l) math.ceil math ceil a / l a l 1 return count <= K count <= K count K l l while True:
    if check(cur):
        max_l = cur + 1
    else:
        min_l = cur

    if cur == (max_l + min_l) // 2:
        break

    cur = (max_l + min_l) // 2 True if check(cur):
        max_l = cur + 1
    else:
        min_l = cur

     check(cur) check cur max_l = cur + 1 max_l cur + 1 cur 1 min_l = cur min_l cur if cur == (max_l + min_l) // 2:
        break

     cur == (max_l + min_l) // 2 cur (max_l + min_l) // 2 max_l + min_l max_l min_l 2 break cur = (max_l + min_l) // 2 cur (max_l + min_l) // 2 max_l + min_l max_l min_l 2 print(cur) print cur min_l = cur cur min_l cur = (max_l + min_l) // 2 (max_l + min_l) // 2 cur max_l = max(A) + 1 max(A) + 1 max_l N, K = map(int, input().split()) map(int, input().split()) N cur = (max_l + min_l) // 2 (max_l + min_l) // 2 cur max_l = cur + 1 cur + 1 max_l K = map(int, input().split()) map(int, input().split()) K A = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) A def check(l):
    count = 0
    for a in A:
        count += math.ceil(a / l) - 1

    return count <= K def check(l):
    count = 0
    for a in A:
        count += math.ceil(a / l) - 1

    return count <= K check min_l = 0 0 min_l
import math

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

max_l = max(A) + 1
min_l = 0
cur = (max_l + min_l) // 2


def check(l):
    count = 0
    for a in A:
        count += math.ceil(a / l) - 1

    return count <= K


while True:
    if check(cur):
        max_l = cur + 1
    else:
        min_l = cur

    if cur == (max_l + min_l) // 2:
        break

    cur = (max_l + min_l) // 2

print(cur)
