import sys
sys.stdin = open("in1.txt", "rt")
n, m = map(int, input().split())
cnt = 0
arr = []
for i in range(n):
    arr.append(int(input()))

def checker(len):
    cnt = 0

    for i in arr:

        cnt += i // len

    return cnt

l = 0
r = max(arr) - 1

while l <= r :
    mid = (l + r) // 2
    if checker(mid) < m:
        r = mid - 1
    else:
        l = mid + 1

print(mid)



f0fecf801d0cd4e2a9acfffcc9f1bd80a6d0e8df
<mask token>


def checker(len):
    cnt = 0
    for i in arr:
        cnt += i // len
    return cnt


<mask token>

<mask token>
for i in range(n):
    arr.append(int(input()))


def checker(len):
    cnt = 0
    for i in arr:
        cnt += i // len
    return cnt


<mask token>
while l <= r:
    mid = (l + r) // 2
    if checker(mid) < m:
        r = mid - 1
    else:
        l = mid + 1
print(mid)

<mask token>
sys.stdin = open('in1.txt', 'rt')
n, m = map(int, input().split())
cnt = 0
arr = []
for i in range(n):
    arr.append(int(input()))


def checker(len):
    cnt = 0
    for i in arr:
        cnt += i // len
    return cnt


l = 0
r = max(arr) - 1
while l <= r:
    mid = (l + r) // 2
    if checker(mid) < m:
        r = mid - 1
    else:
        l = mid + 1
print(mid)

import sys
sys.stdin = open('in1.txt', 'rt')
n, m = map(int, input().split())
cnt = 0
arr = []
for i in range(n):
    arr.append(int(input()))


def checker(len):
    cnt = 0
    for i in arr:
        cnt += i // len
    return cnt


l = 0
r = max(arr) - 1
while l <= r:
    mid = (l + r) // 2
    if checker(mid) < m:
        r = mid - 1
    else:
        l = mid + 1
print(mid)

import sys
sys.stdin = open("in1.txt", "rt")
n, m = map(int, input().split())
cnt = 0
arr = []
for i in range(n):
    arr.append(int(input()))

def checker(len):
    cnt = 0

    for i in arr:

        cnt += i // len

    return cnt

l = 0
r = max(arr) - 1

while l <= r :
    mid = (l + r) // 2
    if checker(mid) < m:
        r = mid - 1
    else:
        l = mid + 1

print(mid)


