from math import *
n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
def is_ok(arg):
    tmp=0
    for i in a:
        tmp+=ceil(i/arg)-1
    return tmp<=k


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
print(meguru_bisect(0, max(a))) from math import * 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 a.sort() a.sort a sort def is_ok(arg):
    tmp=0
    for i in a:
        tmp+=ceil(i/arg)-1
    return tmp<=k is_ok tmp=0 tmp 0 for i in a:
        tmp+=ceil(i/arg)-1
     i a tmp+=ceil(i/arg)-1 tmp ceil(i/arg)-1 ceil(i/arg) ceil i/arg i arg 1 return tmp<=k tmp<=k tmp 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 print(meguru_bisect(0, max(a))) print meguru_bisect(0, max(a)) meguru_bisect 0 max(a) max a a=list(map(int,input().split())) list(map(int,input().split())) a 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 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 k=map(int,input().split()) map(int,input().split()) k n,k=map(int,input().split()) map(int,input().split()) n def is_ok(arg):
    tmp=0
    for i in a:
        tmp+=ceil(i/arg)-1
    return tmp<=k def is_ok(arg):
    tmp=0
    for i in a:
        tmp+=ceil(i/arg)-1
    return tmp<=k is_ok
from math import *
n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
def is_ok(arg):
    tmp=0
    for i in a:
        tmp+=ceil(i/arg)-1
    return tmp<=k


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
print(meguru_bisect(0, max(a)))