import math
#切る回数を足してK以下ならOK
def ok(l):
    x =sum([math.ceil(a/l) -1 for a in A])
    if x <=K:
        return True
   # else:
    #    return False

# 初期入力
import bisect
import sys
input = sys.stdin.readline  #文字列では使わない
N,K = map(int, input().split())
A = list(map(int, input().split()))

#2分探索
bottom,top =0,max(A)
while top -bottom >1:
    mid =(top +bottom)//2
    if ok(mid):
        top =mid
    else:
        bottom =mid
print(top) import math math def ok(l):
    x =sum([math.ceil(a/l) -1 for a in A])
    if x <=K:
        return True
   # else:
    #    return False

# 初期入力 ok math.ceil(a/l) -1 for a in A for a in A a A for a in A math.ceil(a/l) -1 math.ceil(a/l) math.ceil math ceil a/l a l 1 x =sum([math.ceil(a/l) -1 for a in A]) x sum([math.ceil(a/l) -1 for a in A]) sum [math.ceil(a/l) -1 for a in A] if x <=K:
        return True
   # else:
    #    return False

# 初期入力 x <=K x K return True True l l import bisect bisect import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline N,K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split bottom,top =0,max(A) bottom 0 top max(A) max A while top -bottom >1:
    mid =(top +bottom)//2
    if ok(mid):
        top =mid
    else:
        bottom =mid top -bottom >1 top -bottom top bottom 1 mid =(top +bottom)//2 mid (top +bottom)//2 top +bottom top bottom 2 if ok(mid):
        top =mid
    else:
        bottom =mid ok(mid) ok mid top =mid top mid bottom =mid bottom mid print(top) print top def ok(l):
    x =sum([math.ceil(a/l) -1 for a in A])
    if x <=K:
        return True
   # else:
    #    return False

# 初期入力 def ok(l):
    x =sum([math.ceil(a/l) -1 for a in A])
    if x <=K:
        return True
   # else:
    #    return False

# 初期入力 ok bottom,top =0,max(A) 0 bottom top =mid mid top bottom =mid mid bottom K = map(int, input().split()) map(int, input().split()) K A = list(map(int, input().split())) list(map(int, input().split())) A N,K = map(int, input().split()) map(int, input().split()) N top =0,max(A) max(A) top input = sys.stdin.readline sys.stdin.readline input mid =(top +bottom)//2 (top +bottom)//2 mid
import math
#切る回数を足してK以下ならOK
def ok(l):
    x =sum([math.ceil(a/l) -1 for a in A])
    if x <=K:
        return True
   # else:
    #    return False

# 初期入力
import bisect
import sys
input = sys.stdin.readline  #文字列では使わない
N,K = map(int, input().split())
A = list(map(int, input().split()))

#2分探索
bottom,top =0,max(A)
while top -bottom >1:
    mid =(top +bottom)//2
    if ok(mid):
        top =mid
    else:
        bottom =mid
print(top)