import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mat = lambda x, y, v: [[v]*y for _ in range(x)]
ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)]
mod = 1000000007
sys.setrecursionlimit(1000000)

N, K = rl()
A = rl()

def is_ok(x):
	s = 0
	for a in A:
		s += math.ceil(a / x)-1
	return s <= K

l, r = 0, 10**9
while r-l > 1:
	m = (r+l)//2
	if is_ok(m):
		r = m
	else:
		l = m
print(r) import sys, math sys math from collections import defaultdict, deque, Counter from bisect import bisect_left, bisect_right from itertools import combinations, permutations, product from heapq import heappush, heappop from functools import lru_cache input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline rs = lambda: input().strip() rs lambda: input().strip() input().strip() ().strip () input strip ri = lambda: int(input()) ri lambda: int(input()) int(input()) int input() input rl = lambda: list(map(int, input().split())) rl lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split [v]*y for _ in range(x) for _ in range(x) _ range(x) range x for _ in range(x) [v]*y [v] v y mat = lambda x, y, v: [[v]*y for _ in range(x)] mat lambda x, y, v: [[v]*y for _ in range(x)] [[v]*y for _ in range(x)] x y v mat(y, z, v) for _ in range(x) for _ in range(x) _ range(x) range x for _ in range(x) mat(y, z, v) mat y z v ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] ten lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] [mat(y, z, v) for _ in range(x)] x y z v mod = 1000000007 mod 1000000007 sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 N, K = rl() N rl() rl K A = rl() A rl() rl def is_ok(x):
	s = 0
	for a in A:
		s += math.ceil(a / x)-1
	return s <= K is_ok s = 0 s 0 for a in A:
		s += math.ceil(a / x)-1
	 a A s += math.ceil(a / x)-1 s math.ceil(a / x)-1 math.ceil(a / x) math.ceil math ceil a / x a x 1 return s <= K s <= K s K x x l, r = 0, 10**9 l 0 r 10**9 10 9 while r-l > 1:
	m = (r+l)//2
	if is_ok(m):
		r = m
	else:
		l = m r-l > 1 r-l r l 1 m = (r+l)//2 m (r+l)//2 r+l r l 2 if is_ok(m):
		r = m
	else:
		l = m is_ok(m) is_ok m r = m r m l = m l m print(r) print r input = sys.stdin.readline sys.stdin.readline input ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] ten A = rl() rl() A K = rl() rl() K l, r = 0, 10**9 0 l mod = 1000000007 1000000007 mod N, K = rl() rl() N rl = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) rl def is_ok(x):
	s = 0
	for a in A:
		s += math.ceil(a / x)-1
	return s <= K def is_ok(x):
	s = 0
	for a in A:
		s += math.ceil(a / x)-1
	return s <= K is_ok ri = lambda: int(input()) lambda: int(input()) ri r = 0, 10**9 10**9 r r = m m r rs = lambda: input().strip() lambda: input().strip() rs m = (r+l)//2 (r+l)//2 m mat = lambda x, y, v: [[v]*y for _ in range(x)] lambda x, y, v: [[v]*y for _ in range(x)] mat l = m m l
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mat = lambda x, y, v: [[v]*y for _ in range(x)]
ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)]
mod = 1000000007
sys.setrecursionlimit(1000000)

N, K = rl()
A = rl()

def is_ok(x):
	s = 0
	for a in A:
		s += math.ceil(a / x)-1
	return s <= K

l, r = 0, 10**9
while r-l > 1:
	m = (r+l)//2
	if is_ok(m):
		r = m
	else:
		l = m
print(r)
