import math

N, K = (int(a) for a in input().split())
A = [int(a) for a in input().split()]

def isOK(X):
    cutcount = 0
    for i in range(N):
        cutcount += math.ceil(A[i] / X) - 1
    if cutcount <= K:
        return True
    else:
        return False

def binary_search():
    left = 0
    right = max(A) + 1

    while (right - left) > 1:
        mid = left + (right - left) // 2
        if (isOK(mid)):
           right = mid;
        else:
            left = mid;

    return right

print(binary_search()) import math math int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a N, K = (int(a) for a in input().split()) N (int(a) for a in input().split()) K int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a A = [int(a) for a in input().split()] A [int(a) for a in input().split()] def isOK(X):
    cutcount = 0
    for i in range(N):
        cutcount += math.ceil(A[i] / X) - 1
    if cutcount <= K:
        return True
    else:
        return False isOK cutcount = 0 cutcount 0 for i in range(N):
        cutcount += math.ceil(A[i] / X) - 1
     i range(N) range N cutcount += math.ceil(A[i] / X) - 1 cutcount math.ceil(A[i] / X) - 1 math.ceil(A[i] / X) math.ceil math ceil A[i] / X A[i] A i X 1 if cutcount <= K:
        return True
    else:
        return False cutcount <= K cutcount K return True True return False False X X def binary_search():
    left = 0
    right = max(A) + 1

    while (right - left) > 1:
        mid = left + (right - left) // 2
        if (isOK(mid)):
           right = mid;
        else:
            left = mid;

    return right binary_search left = 0 left 0 right = max(A) + 1 right max(A) + 1 max(A) max A 1 while (right - left) > 1:
        mid = left + (right - left) // 2
        if (isOK(mid)):
           right = mid;
        else:
            left = mid;

     (right - left) > 1 right - left right left 1 mid = left + (right - left) // 2 mid left + (right - left) // 2 left (right - left) // 2 right - left right left 2 if (isOK(mid)):
           right = mid;
        else:
            left = mid;

     isOK(mid) isOK mid right = mid right mid left = mid left mid return right right print(binary_search()) print binary_search() binary_search K = (int(a) for a in input().split()) (int(a) for a in input().split()) K def binary_search():
    left = 0
    right = max(A) + 1

    while (right - left) > 1:
        mid = left + (right - left) // 2
        if (isOK(mid)):
           right = mid;
        else:
            left = mid;

    return right def binary_search():
    left = 0
    right = max(A) + 1

    while (right - left) > 1:
        mid = left + (right - left) // 2
        if (isOK(mid)):
           right = mid;
        else:
            left = mid;

    return right binary_search N, K = (int(a) for a in input().split()) (int(a) for a in input().split()) N def isOK(X):
    cutcount = 0
    for i in range(N):
        cutcount += math.ceil(A[i] / X) - 1
    if cutcount <= K:
        return True
    else:
        return False def isOK(X):
    cutcount = 0
    for i in range(N):
        cutcount += math.ceil(A[i] / X) - 1
    if cutcount <= K:
        return True
    else:
        return False isOK A = [int(a) for a in input().split()] [int(a) for a in input().split()] A
import math

N, K = (int(a) for a in input().split())
A = [int(a) for a in input().split()]

def isOK(X):
    cutcount = 0
    for i in range(N):
        cutcount += math.ceil(A[i] / X) - 1
    if cutcount <= K:
        return True
    else:
        return False

def binary_search():
    left = 0
    right = max(A) + 1

    while (right - left) > 1:
        mid = left + (right - left) // 2
        if (isOK(mid)):
           right = mid;
        else:
            left = mid;

    return right

print(binary_search())