import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import numpy as np
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N,K = I()
A = l()

def ok(n):
    t = 0
    for a in A:
        if a <= n:
            continue
        t += math.ceil(a/n)-1
    return t <= K

upper = 1000000000
lower = 0
while abs(lower-upper) > 1:
    m = (upper+lower)//2
    if ok(m):
        upper = m
    else:
        lower = m
print(math.ceil(upper)) import sys sys import math math import itertools itertools import bisect bisect from copy import copy from collections import deque,Counter from decimal import Decimal import numpy as np numpy def s(): return input() s def i(): return int(input()) i def S(): return input().split() S def I(): return map(int,input().split()) I def L(): return list(input().split()) L def l(): return list(map(int,input().split())) l def lcm(a,b): return a*b//math.gcd(a,b) lcm a a b b sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 10**9 INF 10**9 10 9 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 N,K = I() N I() I K A = l() A l() l def ok(n):
    t = 0
    for a in A:
        if a <= n:
            continue
        t += math.ceil(a/n)-1
    return t <= K ok t = 0 t 0 for a in A:
        if a <= n:
            continue
        t += math.ceil(a/n)-1
     a A if a <= n:
            continue
         a <= n a n continue t += math.ceil(a/n)-1 t math.ceil(a/n)-1 math.ceil(a/n) math.ceil math ceil a/n a n 1 return t <= K t <= K t K n n upper = 1000000000 upper 1000000000 lower = 0 lower 0 while abs(lower-upper) > 1:
    m = (upper+lower)//2
    if ok(m):
        upper = m
    else:
        lower = m abs(lower-upper) > 1 abs(lower-upper) abs lower-upper lower upper 1 m = (upper+lower)//2 m (upper+lower)//2 upper+lower upper lower 2 if ok(m):
        upper = m
    else:
        lower = m ok(m) ok m upper = m upper m lower = m lower m print(math.ceil(upper)) print math.ceil(upper) math.ceil math ceil upper def I(): return map(int,input().split()) def I(): return map(int,input().split()) I def l(): return list(map(int,input().split())) def l(): return list(map(int,input().split())) l upper = m m upper mod = 10**9+7 10**9+7 mod lower = m m lower def s(): return input() def s(): return input() s def S(): return input().split() def S(): return input().split() S def i(): return int(input()) def i(): return int(input()) i upper = 1000000000 1000000000 upper m = (upper+lower)//2 (upper+lower)//2 m def ok(n):
    t = 0
    for a in A:
        if a <= n:
            continue
        t += math.ceil(a/n)-1
    return t <= K def ok(n):
    t = 0
    for a in A:
        if a <= n:
            continue
        t += math.ceil(a/n)-1
    return t <= K ok def L(): return list(input().split()) def L(): return list(input().split()) L N,K = I() I() N A = l() l() A def lcm(a,b): return a*b//math.gcd(a,b) def lcm(a,b): return a*b//math.gcd(a,b) lcm K = I() I() K INF = 10**9 10**9 INF lower = 0 0 lower
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import numpy as np
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N,K = I()
A = l()

def ok(n):
    t = 0
    for a in A:
        if a <= n:
            continue
        t += math.ceil(a/n)-1
    return t <= K

upper = 1000000000
lower = 0
while abs(lower-upper) > 1:
    m = (upper+lower)//2
    if ok(m):
        upper = m
    else:
        lower = m
print(math.ceil(upper))