import sys
import heapq
import math
def input(): return sys.stdin.readline().rstrip()
def main():
    n, k = map(int,input().split())
    A = list(map(int,input().split()))
    def is_good(mid, key):
        kk = 0
        for a in A:
            kk += -(-a//mid)-1
        if kk <= key:
            return True
        else:
            return False
    def bi_search(bad, good, key):
        while good - bad > 1:
            mid = (bad + good)//2
            if is_good(mid, key):
                good = mid
            else:
                bad = mid
        return good
    
    print(bi_search(0, 1000000000, k))
    
    
    


if __name__=='__main__':
    main() import sys sys import heapq heapq import math math def input(): return sys.stdin.readline().rstrip() input def main():
    n, k = map(int,input().split())
    A = list(map(int,input().split()))
    def is_good(mid, key):
        kk = 0
        for a in A:
            kk += -(-a//mid)-1
        if kk <= key:
            return True
        else:
            return False
    def bi_search(bad, good, key):
        while good - bad > 1:
            mid = (bad + good)//2
            if is_good(mid, key):
                good = mid
            else:
                bad = mid
        return good
    
    print(bi_search(0, 1000000000, k))
    
    
     main 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 def is_good(mid, key):
        kk = 0
        for a in A:
            kk += -(-a//mid)-1
        if kk <= key:
            return True
        else:
            return False
     is_good kk = 0 kk 0 for a in A:
            kk += -(-a//mid)-1
         a A kk += -(-a//mid)-1 kk -(-a//mid)-1 -(-a//mid) -a//mid -a a mid 1 if kk <= key:
            return True
        else:
            return False
     kk <= key kk key return True True return False False mid mid key key def bi_search(bad, good, key):
        while good - bad > 1:
            mid = (bad + good)//2
            if is_good(mid, key):
                good = mid
            else:
                bad = mid
        return good
    
     bi_search while good - bad > 1:
            mid = (bad + good)//2
            if is_good(mid, key):
                good = mid
            else:
                bad = mid
         good - bad > 1 good - bad good bad 1 mid = (bad + good)//2 mid (bad + good)//2 bad + good bad good 2 if is_good(mid, key):
                good = mid
            else:
                bad = mid
         is_good(mid, key) is_good mid key good = mid good mid bad = mid bad mid return good good bad bad good good key key print(bi_search(0, 1000000000, k)) print bi_search(0, 1000000000, k) bi_search 0 1000000000 k if __name__=='__main__':
    main() __name__=='__main__' __name__ '__main__' main() main def main():
    n, k = map(int,input().split())
    A = list(map(int,input().split()))
    def is_good(mid, key):
        kk = 0
        for a in A:
            kk += -(-a//mid)-1
        if kk <= key:
            return True
        else:
            return False
    def bi_search(bad, good, key):
        while good - bad > 1:
            mid = (bad + good)//2
            if is_good(mid, key):
                good = mid
            else:
                bad = mid
        return good
    
    print(bi_search(0, 1000000000, k))
    
    
     def main():
    n, k = map(int,input().split())
    A = list(map(int,input().split()))
    def is_good(mid, key):
        kk = 0
        for a in A:
            kk += -(-a//mid)-1
        if kk <= key:
            return True
        else:
            return False
    def bi_search(bad, good, key):
        while good - bad > 1:
            mid = (bad + good)//2
            if is_good(mid, key):
                good = mid
            else:
                bad = mid
        return good
    
    print(bi_search(0, 1000000000, k))
    
    
     main def input(): return sys.stdin.readline().rstrip() def input(): return sys.stdin.readline().rstrip() input
import sys
import heapq
import math
def input(): return sys.stdin.readline().rstrip()
def main():
    n, k = map(int,input().split())
    A = list(map(int,input().split()))
    def is_good(mid, key):
        kk = 0
        for a in A:
            kk += -(-a//mid)-1
        if kk <= key:
            return True
        else:
            return False
    def bi_search(bad, good, key):
        while good - bad > 1:
            mid = (bad + good)//2
            if is_good(mid, key):
                good = mid
            else:
                bad = mid
        return good
    
    print(bi_search(0, 1000000000, k))
    
    
    


if __name__=='__main__':
    main()