import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    N, K = MI()
    A = LI()
    A.sort()
    # print(A)

    def is_ok(arg):
        cnt = 0
        for a in A:
            cnt += ceil(a / arg) - 1

        if cnt > K: return False
        else: return True

    def meguru_bisect(ng, ok):
        while (abs(ok - ng) > 1):
            mid = (ok + ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    l = 0
    r = max(A)+1
    print(meguru_bisect(l, r))

if __name__ == '__main__':
    solve() import sys sys sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 def int1(x): return int(x) - 1 int1 x x def II(): return int(input()) II def MI(): return map(int, input().split()) MI def MI1(): return map(int1, input().split()) MI1 def LI(): return list(map(int, input().split())) LI def LI1(): return list(map(int1, input().split())) LI1 LI() for _ in range(rows_number) for _ in range(rows_number) _ range(rows_number) range rows_number for _ in range(rows_number) LI() LI def LLI(rows_number): return [LI() for _ in range(rows_number)] LLI rows_number rows_number def MS(): return input().split() MS def LS(): return list(input()) LS LS() for _ in range(rows_number) for _ in range(rows_number) _ range(rows_number) range rows_number for _ in range(rows_number) LS() LS def LLS(rows_number): return [LS() for _ in range(rows_number)] LLS rows_number rows_number def printlist(lst, k=' '): print(k.join(list(map(str, lst)))) printlist lst lst k=' ' k ' ' INF = float('inf') INF float('inf') float 'inf' from math import ceil, floor, log2 def solve():
    N, K = MI()
    A = LI()
    A.sort()
    # print(A)

    def is_ok(arg):
        cnt = 0
        for a in A:
            cnt += ceil(a / arg) - 1

        if cnt > K: return False
        else: return True

    def meguru_bisect(ng, ok):
        while (abs(ok - ng) > 1):
            mid = (ok + ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    l = 0
    r = max(A)+1
    print(meguru_bisect(l, r)) solve N, K = MI() N MI() MI K A = LI() A LI() LI A.sort() A.sort A sort def is_ok(arg):
        cnt = 0
        for a in A:
            cnt += ceil(a / arg) - 1

        if cnt > K: return False
        else: return True

     is_ok cnt = 0 cnt 0 for a in A:
            cnt += ceil(a / arg) - 1

         a A cnt += ceil(a / arg) - 1 cnt ceil(a / arg) - 1 ceil(a / arg) ceil a / arg a arg 1 if cnt > K: return False
        else: return True

     cnt > K cnt K arg arg def meguru_bisect(ng, ok):
        while (abs(ok - ng) > 1):
            mid = (ok + ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

     meguru_bisect while (abs(ok - ng) > 1):
            mid = (ok + ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
         abs(ok - ng) > 1 abs(ok - ng) abs ok - ng ok ng 1 mid = (ok + ng) // 2 mid (ok + ng) // 2 ok + ng ok ng 2 if is_ok(mid):
                ok = mid
            else:
                ng = mid
         is_ok(mid) is_ok mid ok = mid ok mid ng = mid ng mid return ok ok ng ng ok ok l = 0 l 0 r = max(A)+1 r max(A)+1 max(A) max A 1 print(meguru_bisect(l, r)) print meguru_bisect(l, r) meguru_bisect l r if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def MI1(): return map(int1, input().split()) def MI1(): return map(int1, input().split()) MI1 def LI1(): return list(map(int1, input().split())) def LI1(): return list(map(int1, input().split())) LI1 def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI def LLI(rows_number): return [LI() for _ in range(rows_number)] def LLI(rows_number): return [LI() for _ in range(rows_number)] LLI def printlist(lst, k=' '): print(k.join(list(map(str, lst)))) def printlist(lst, k=' '): print(k.join(list(map(str, lst)))) printlist def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI def MS(): return input().split() def MS(): return input().split() MS def solve():
    N, K = MI()
    A = LI()
    A.sort()
    # print(A)

    def is_ok(arg):
        cnt = 0
        for a in A:
            cnt += ceil(a / arg) - 1

        if cnt > K: return False
        else: return True

    def meguru_bisect(ng, ok):
        while (abs(ok - ng) > 1):
            mid = (ok + ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    l = 0
    r = max(A)+1
    print(meguru_bisect(l, r)) def solve():
    N, K = MI()
    A = LI()
    A.sort()
    # print(A)

    def is_ok(arg):
        cnt = 0
        for a in A:
            cnt += ceil(a / arg) - 1

        if cnt > K: return False
        else: return True

    def meguru_bisect(ng, ok):
        while (abs(ok - ng) > 1):
            mid = (ok + ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    l = 0
    r = max(A)+1
    print(meguru_bisect(l, r)) solve def II(): return int(input()) def II(): return int(input()) II def int1(x): return int(x) - 1 def int1(x): return int(x) - 1 int1 INF = float('inf') float('inf') INF def LLS(rows_number): return [LS() for _ in range(rows_number)] def LLS(rows_number): return [LS() for _ in range(rows_number)] LLS def LS(): return list(input()) def LS(): return list(input()) LS
import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    N, K = MI()
    A = LI()
    A.sort()
    # print(A)

    def is_ok(arg):
        cnt = 0
        for a in A:
            cnt += ceil(a / arg) - 1

        if cnt > K: return False
        else: return True

    def meguru_bisect(ng, ok):
        while (abs(ok - ng) > 1):
            mid = (ok + ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    l = 0
    r = max(A)+1
    print(meguru_bisect(l, r))

if __name__ == '__main__':
    solve()
