from math import ceil


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

def f(x):
    cnt = 0
    for a in A:
        cnt += ceil(a / x) - 1
    return True if cnt <= K else False

OK, NG = 10**9, 0
while OK - NG > 1:
    mid = (OK + NG) // 2
    if f(mid):
        OK = mid
    else:
        NG = mid

print(OK) from math import ceil 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 f(x):
    cnt = 0
    for a in A:
        cnt += ceil(a / x) - 1
    return True if cnt <= K else False f cnt = 0 cnt 0 for a in A:
        cnt += ceil(a / x) - 1
     a A cnt += ceil(a / x) - 1 cnt ceil(a / x) - 1 ceil(a / x) ceil a / x a x 1 return True if cnt <= K else False True if cnt <= K else False cnt <= K cnt K True False x x OK, NG = 10**9, 0 OK 10**9 10 9 NG 0 while OK - NG > 1:
    mid = (OK + NG) // 2
    if f(mid):
        OK = mid
    else:
        NG = mid OK - NG > 1 OK - NG OK NG 1 mid = (OK + NG) // 2 mid (OK + NG) // 2 OK + NG OK NG 2 if f(mid):
        OK = mid
    else:
        NG = mid f(mid) f mid OK = mid OK mid NG = mid NG mid print(OK) print OK OK, NG = 10**9, 0 10**9 OK OK = mid mid OK NG = mid mid NG mid = (OK + NG) // 2 (OK + NG) // 2 mid NG = 10**9, 0 0 NG K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N def f(x):
    cnt = 0
    for a in A:
        cnt += ceil(a / x) - 1
    return True if cnt <= K else False def f(x):
    cnt = 0
    for a in A:
        cnt += ceil(a / x) - 1
    return True if cnt <= K else False f A = list(map(int, input().split())) list(map(int, input().split())) A
from math import ceil


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

def f(x):
    cnt = 0
    for a in A:
        cnt += ceil(a / x) - 1
    return True if cnt <= K else False

OK, NG = 10**9, 0
while OK - NG > 1:
    mid = (OK + NG) // 2
    if f(mid):
        OK = mid
    else:
        NG = mid

print(OK)
