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

A = list(map(int, input().split()))
d = [0] * N

#二分探索
min1 = 0
max1 = max(A) + 1

while True:
    X = (min1 + max1)//2
    for i in range(N):
        if A[i] % X == 0:
            d[i] = A[i]//X - 1
        else:
            d[i] = A[i]//X
    if sum(d) <= K:
        max1 = X 
    else:
        min1 = X
    #print(min1, max1)

    if max1 - min1 <= 1:
        print(int(max1))
        break 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 d = [0] * N d [0] * N [0] 0 N min1 = 0 min1 0 max1 = max(A) + 1 max1 max(A) + 1 max(A) max A 1 while True:
    X = (min1 + max1)//2
    for i in range(N):
        if A[i] % X == 0:
            d[i] = A[i]//X - 1
        else:
            d[i] = A[i]//X
    if sum(d) <= K:
        max1 = X 
    else:
        min1 = X
    #print(min1, max1)

    if max1 - min1 <= 1:
        print(int(max1))
        break True X = (min1 + max1)//2 X (min1 + max1)//2 min1 + max1 min1 max1 2 for i in range(N):
        if A[i] % X == 0:
            d[i] = A[i]//X - 1
        else:
            d[i] = A[i]//X
     i range(N) range N if A[i] % X == 0:
            d[i] = A[i]//X - 1
        else:
            d[i] = A[i]//X
     A[i] % X == 0 A[i] % X A[i] A i X 0 d[i] = A[i]//X - 1 d[i] d i A[i]//X - 1 A[i]//X A[i] A i X 1 d[i] = A[i]//X d[i] d i A[i]//X A[i] A i X if sum(d) <= K:
        max1 = X 
    else:
        min1 = X
    #print(min1, max1)

     sum(d) <= K sum(d) sum d K max1 = X max1 X min1 = X min1 X if max1 - min1 <= 1:
        print(int(max1))
        break max1 - min1 <= 1 max1 - min1 max1 min1 1 print(int(max1)) print int(max1) int max1 break max1 = X X max1 d = [0] * N [0] * N d K = map(int, input().split()) map(int, input().split()) K A = list(map(int, input().split())) list(map(int, input().split())) A N ,K = map(int, input().split()) map(int, input().split()) N min1 = 0 0 min1 max1 = max(A) + 1 max(A) + 1 max1 X = (min1 + max1)//2 (min1 + max1)//2 X min1 = X X min1
N ,K = map(int, input().split())

A = list(map(int, input().split()))
d = [0] * N

#二分探索
min1 = 0
max1 = max(A) + 1

while True:
    X = (min1 + max1)//2
    for i in range(N):
        if A[i] % X == 0:
            d[i] = A[i]//X - 1
        else:
            d[i] = A[i]//X
    if sum(d) <= K:
        max1 = X 
    else:
        min1 = X
    #print(min1, max1)

    if max1 - min1 <= 1:
        print(int(max1))
        break
