import math

n,k = (int(x) for x in input().split())
An = [int(i) for i in input().split()]

left = 0
right = max(An)

def check(x):
    chk = 0
    for i in range(n):
        chk += math.ceil(An[i]/x)-1
    return chk

while right-left!=1:
    x = (left+right)//2
    if check(x)<=k:
        right = x
    else:
        left = x

print(right) import math math int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x n,k = (int(x) for x in input().split()) n (int(x) for x in input().split()) k int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i An = [int(i) for i in input().split()] An [int(i) for i in input().split()] left = 0 left 0 right = max(An) right max(An) max An def check(x):
    chk = 0
    for i in range(n):
        chk += math.ceil(An[i]/x)-1
    return chk check chk = 0 chk 0 for i in range(n):
        chk += math.ceil(An[i]/x)-1
     i range(n) range n chk += math.ceil(An[i]/x)-1 chk math.ceil(An[i]/x)-1 math.ceil(An[i]/x) math.ceil math ceil An[i]/x An[i] An i x 1 return chk chk x x while right-left!=1:
    x = (left+right)//2
    if check(x)<=k:
        right = x
    else:
        left = x right-left!=1 right-left right left 1 x = (left+right)//2 x (left+right)//2 left+right left right 2 if check(x)<=k:
        right = x
    else:
        left = x check(x)<=k check(x) check x k right = x right x left = x left x print(right) print right left = x x left left = 0 0 left right = x x right right = max(An) max(An) right An = [int(i) for i in input().split()] [int(i) for i in input().split()] An def check(x):
    chk = 0
    for i in range(n):
        chk += math.ceil(An[i]/x)-1
    return chk def check(x):
    chk = 0
    for i in range(n):
        chk += math.ceil(An[i]/x)-1
    return chk check k = (int(x) for x in input().split()) (int(x) for x in input().split()) k x = (left+right)//2 (left+right)//2 x n,k = (int(x) for x in input().split()) (int(x) for x in input().split()) n
import math

n,k = (int(x) for x in input().split())
An = [int(i) for i in input().split()]

left = 0
right = max(An)

def check(x):
    chk = 0
    for i in range(n):
        chk += math.ceil(An[i]/x)-1
    return chk

while right-left!=1:
    x = (left+right)//2
    if check(x)<=k:
        right = x
    else:
        left = x

print(right)