import math

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

def seikai(x):
    count = 0
    for i in range(n):
        count += math.ceil(a[i] / x) - 1

    if(count <= k):
        return 1
    else:
        return 0

l = 0
r = 10 ** 9
while(r - l > 1):
    temp = (r + l) // 2
    if(seikai(temp) == 1):
        r = temp
    else:
        l = temp

print(r) import math math 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 n, k = [int(i) for i in input().split()] n [int(i) for i 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 a = [int(i) for i in input().split()] a [int(i) for i in input().split()] def seikai(x):
    count = 0
    for i in range(n):
        count += math.ceil(a[i] / x) - 1

    if(count <= k):
        return 1
    else:
        return 0 seikai count = 0 count 0 for i in range(n):
        count += math.ceil(a[i] / x) - 1

     i range(n) range n count += math.ceil(a[i] / x) - 1 count 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(count <= k):
        return 1
    else:
        return 0 count <= k count k return 1 1 return 0 0 x x l = 0 l 0 r = 10 ** 9 r 10 ** 9 10 9 while(r - l > 1):
    temp = (r + l) // 2
    if(seikai(temp) == 1):
        r = temp
    else:
        l = temp r - l > 1 r - l r l 1 temp = (r + l) // 2 temp (r + l) // 2 r + l r l 2 if(seikai(temp) == 1):
        r = temp
    else:
        l = temp seikai(temp) == 1 seikai(temp) seikai temp 1 r = temp r temp l = temp l temp print(r) print r r = 10 ** 9 10 ** 9 r k = [int(i) for i in input().split()] [int(i) for i in input().split()] k l = 0 0 l l = temp temp l a = [int(i) for i in input().split()] [int(i) for i in input().split()] a n, k = [int(i) for i in input().split()] [int(i) for i in input().split()] n r = temp temp r def seikai(x):
    count = 0
    for i in range(n):
        count += math.ceil(a[i] / x) - 1

    if(count <= k):
        return 1
    else:
        return 0 def seikai(x):
    count = 0
    for i in range(n):
        count += math.ceil(a[i] / x) - 1

    if(count <= k):
        return 1
    else:
        return 0 seikai temp = (r + l) // 2 (r + l) // 2 temp
import math

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

def seikai(x):
    count = 0
    for i in range(n):
        count += math.ceil(a[i] / x) - 1

    if(count <= k):
        return 1
    else:
        return 0

l = 0
r = 10 ** 9
while(r - l > 1):
    temp = (r + l) // 2
    if(seikai(temp) == 1):
        r = temp
    else:
        l = temp

print(r)