import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
def main():
    n, k, *a = map(int, read().split())
    def isOK(x):
        kaisu = 0
        for ae in a:
            kaisu += ceil(ae / x) - 1
        if kaisu <= k:
            return True
        else:
            return False
    ng = 0
    ok = max(a)
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if isOK(mid):
            ok = mid
        else:
            ng = mid
    print(ok)

if __name__ == '__main__':
    main() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines from math import ceil def main():
    n, k, *a = map(int, read().split())
    def isOK(x):
        kaisu = 0
        for ae in a:
            kaisu += ceil(ae / x) - 1
        if kaisu <= k:
            return True
        else:
            return False
    ng = 0
    ok = max(a)
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if isOK(mid):
            ok = mid
        else:
            ng = mid
    print(ok) main n, k, *a = map(int, read().split()) n map(int, read().split()) map int read().split() ().split () read split k *a a def isOK(x):
        kaisu = 0
        for ae in a:
            kaisu += ceil(ae / x) - 1
        if kaisu <= k:
            return True
        else:
            return False
     isOK kaisu = 0 kaisu 0 for ae in a:
            kaisu += ceil(ae / x) - 1
         ae a kaisu += ceil(ae / x) - 1 kaisu ceil(ae / x) - 1 ceil(ae / x) ceil ae / x ae x 1 if kaisu <= k:
            return True
        else:
            return False
     kaisu <= k kaisu k return True True return False False x x ng = 0 ng 0 ok = max(a) ok max(a) max a while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if isOK(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 isOK(mid):
            ok = mid
        else:
            ng = mid
     isOK(mid) isOK mid ok = mid ok mid ng = mid ng mid print(ok) print ok if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main read = sys.stdin.read sys.stdin.read read readlines = sys.stdin.readlines sys.stdin.readlines readlines def main():
    n, k, *a = map(int, read().split())
    def isOK(x):
        kaisu = 0
        for ae in a:
            kaisu += ceil(ae / x) - 1
        if kaisu <= k:
            return True
        else:
            return False
    ng = 0
    ok = max(a)
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if isOK(mid):
            ok = mid
        else:
            ng = mid
    print(ok) def main():
    n, k, *a = map(int, read().split())
    def isOK(x):
        kaisu = 0
        for ae in a:
            kaisu += ceil(ae / x) - 1
        if kaisu <= k:
            return True
        else:
            return False
    ng = 0
    ok = max(a)
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if isOK(mid):
            ok = mid
        else:
            ng = mid
    print(ok) main
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
def main():
    n, k, *a = map(int, read().split())
    def isOK(x):
        kaisu = 0
        for ae in a:
            kaisu += ceil(ae / x) - 1
        if kaisu <= k:
            return True
        else:
            return False
    ng = 0
    ok = max(a)
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if isOK(mid):
            ok = mid
        else:
            ng = mid
    print(ok)

if __name__ == '__main__':
    main()
