import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, K = LI()
    A = LI()

    # 最大の長さがxになるような切断回数
    def cut_num(x):
        ret = sum([math.ceil(i / x) - 1 for i in A])
        return ret

    ng = 0
    ok = max(A)
    while abs(ok-ng)>10**(-6):
        m = (ng+ok)/2
        if cut_num(m) <= K:
            ok = m
        else:
            ng = m

    print(math.ceil(ok))

if __name__ == '__main__':
    resolve() import bisect, collections, copy, heapq, itertools, math, string, sys bisect collections copy heapq itertools math string sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 INF = float('inf') INF float('inf') float 'inf' def I(): return int(input()) I def F(): return float(input()) F def SS(): return input() SS 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 def LI(): return [int(x) for x in input().split()] LI int(x)-1 for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x)-1 int(x) int x 1 def LI_(): return [int(x)-1 for x in input().split()] LI_ float(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() float(x) float x def LF(): return [float(x) for x in input().split()] LF def LSS(): return input().split() LSS def resolve():
    N, K = LI()
    A = LI()

    # 最大の長さがxになるような切断回数
    def cut_num(x):
        ret = sum([math.ceil(i / x) - 1 for i in A])
        return ret

    ng = 0
    ok = max(A)
    while abs(ok-ng)>10**(-6):
        m = (ng+ok)/2
        if cut_num(m) <= K:
            ok = m
        else:
            ng = m

    print(math.ceil(ok)) resolve N, K = LI() N LI() LI K A = LI() A LI() LI def cut_num(x):
        ret = sum([math.ceil(i / x) - 1 for i in A])
        return ret

     cut_num math.ceil(i / x) - 1 for i in A for i in A i A for i in A math.ceil(i / x) - 1 math.ceil(i / x) math.ceil math ceil i / x i x 1 ret = sum([math.ceil(i / x) - 1 for i in A]) ret sum([math.ceil(i / x) - 1 for i in A]) sum [math.ceil(i / x) - 1 for i in A] return ret ret x x ng = 0 ng 0 ok = max(A) ok max(A) max A while abs(ok-ng)>10**(-6):
        m = (ng+ok)/2
        if cut_num(m) <= K:
            ok = m
        else:
            ng = m

     abs(ok-ng)>10**(-6) abs(ok-ng) abs ok-ng ok ng 10**(-6) 10 -6 m = (ng+ok)/2 m (ng+ok)/2 ng+ok ng ok 2 if cut_num(m) <= K:
            ok = m
        else:
            ng = m

     cut_num(m) <= K cut_num(m) cut_num m K ok = m ok m ng = m ng m print(math.ceil(ok)) print math.ceil(ok) math.ceil math ceil ok if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve def I(): return int(input()) def I(): return int(input()) I def LF(): return [float(x) for x in input().split()] def LF(): return [float(x) for x in input().split()] LF input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def SS(): return input() def SS(): return input() SS def F(): return float(input()) def F(): return float(input()) F INF = float('inf') float('inf') INF def resolve():
    N, K = LI()
    A = LI()

    # 最大の長さがxになるような切断回数
    def cut_num(x):
        ret = sum([math.ceil(i / x) - 1 for i in A])
        return ret

    ng = 0
    ok = max(A)
    while abs(ok-ng)>10**(-6):
        m = (ng+ok)/2
        if cut_num(m) <= K:
            ok = m
        else:
            ng = m

    print(math.ceil(ok)) def resolve():
    N, K = LI()
    A = LI()

    # 最大の長さがxになるような切断回数
    def cut_num(x):
        ret = sum([math.ceil(i / x) - 1 for i in A])
        return ret

    ng = 0
    ok = max(A)
    while abs(ok-ng)>10**(-6):
        m = (ng+ok)/2
        if cut_num(m) <= K:
            ok = m
        else:
            ng = m

    print(math.ceil(ok)) resolve def LI(): return [int(x) for x in input().split()] def LI(): return [int(x) for x in input().split()] LI def LI_(): return [int(x)-1 for x in input().split()] def LI_(): return [int(x)-1 for x in input().split()] LI_ def LSS(): return input().split() def LSS(): return input().split() LSS
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, K = LI()
    A = LI()

    # 最大の長さがxになるような切断回数
    def cut_num(x):
        ret = sum([math.ceil(i / x) - 1 for i in A])
        return ret

    ng = 0
    ok = max(A)
    while abs(ok-ng)>10**(-6):
        m = (ng+ok)/2
        if cut_num(m) <= K:
            ok = m
        else:
            ng = m

    print(math.ceil(ok))

if __name__ == '__main__':
    resolve()
