import math

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

A.sort(reverse=True)

left = 1
right = A[0]
while int(left) != int(right):
    mid = (left + right) / 2
    k = sum(int(a / mid) if mid < a else 0 for a in A)
    if k <= K:
        if right == mid:
            break
        right = mid
    else:
        if left == mid:
            break
        left = mid
print(math.ceil(left)) import math math 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 A.sort(reverse=True) A.sort A sort reverse=True reverse True left = 1 left 1 right = A[0] right A[0] A 0 while int(left) != int(right):
    mid = (left + right) / 2
    k = sum(int(a / mid) if mid < a else 0 for a in A)
    if k <= K:
        if right == mid:
            break
        right = mid
    else:
        if left == mid:
            break
        left = mid int(left) != int(right) int(left) int left int(right) int right mid = (left + right) / 2 mid (left + right) / 2 left + right left right 2 k = sum(int(a / mid) if mid < a else 0 for a in A) k sum(int(a / mid) if mid < a else 0 for a in A) sum int(a / mid) if mid < a else 0 mid < a mid a int(a / mid) int a / mid a mid 0 if k <= K:
        if right == mid:
            break
        right = mid
    else:
        if left == mid:
            break
        left = mid k <= K k K if right == mid:
            break
         right == mid right mid break right = mid right mid if left == mid:
            break
         left == mid left mid break left = mid left mid print(math.ceil(left)) print math.ceil(left) math.ceil math ceil left A = list(map(int, input().split())) list(map(int, input().split())) A right = mid mid right N, K = map(int, input().split()) map(int, input().split()) N left = mid mid left right = A[0] A[0] right K = map(int, input().split()) map(int, input().split()) K left = 1 1 left k = sum(int(a / mid) if mid < a else 0 for a in A) sum(int(a / mid) if mid < a else 0 for a in A) k mid = (left + right) / 2 (left + right) / 2 mid
import math

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

A.sort(reverse=True)

left = 1
right = A[0]
while int(left) != int(right):
    mid = (left + right) / 2
    k = sum(int(a / mid) if mid < a else 0 for a in A)
    if k <= K:
        if right == mid:
            break
        right = mid
    else:
        if left == mid:
            break
        left = mid
print(math.ceil(left))