def General_Binary_Search(L,R,cond,Integer=True,ep=1/(1<<20)):
    """一般的な二部探索を行う.
    L:解の下限
    R:解の上限
    cond:条件(1変数関数,単調減少を満たす)
    Integer:解を整数に制限するか?
    ep:Integer=Falseのとき,解の許容する誤差
    """

    if Integer:
        R+=1
        while R-L>1:
            C=L+(R-L)//2
            if cond(C):
                L=C
            else:
                R=C
        return L
    else:
        C=(R-L)/2
        while (R-C)>ep:
            if cond(C):
                L=C
            else:
                R=C
            C=L+(R-L)/2
        return C
#======================================
N,K=map(int,input().split())
A=list(map(int,input().split()))

def f(x):
    r=0
    for a in A:
        r+=(a+x-1)//x
    return r-N

print(-General_Binary_Search(-max(A),-1,lambda x:f(-x)<=K)) def General_Binary_Search(L,R,cond,Integer=True,ep=1/(1<<20)):
    """一般的な二部探索を行う.
    L:解の下限
    R:解の上限
    cond:条件(1変数関数,単調減少を満たす)
    Integer:解を整数に制限するか?
    ep:Integer=Falseのとき,解の許容する誤差
    """

    if Integer:
        R+=1
        while R-L>1:
            C=L+(R-L)//2
            if cond(C):
                L=C
            else:
                R=C
        return L
    else:
        C=(R-L)/2
        while (R-C)>ep:
            if cond(C):
                L=C
            else:
                R=C
            C=L+(R-L)/2
        return C
#====================================== General_Binary_Search """一般的な二部探索を行う.
    L:解の下限
    R:解の上限
    cond:条件(1変数関数,単調減少を満たす)
    Integer:解を整数に制限するか?
    ep:Integer=Falseのとき,解の許容する誤差
    """ if Integer:
        R+=1
        while R-L>1:
            C=L+(R-L)//2
            if cond(C):
                L=C
            else:
                R=C
        return L
    else:
        C=(R-L)/2
        while (R-C)>ep:
            if cond(C):
                L=C
            else:
                R=C
            C=L+(R-L)/2
        return C
#====================================== Integer R+=1 R 1 while R-L>1:
            C=L+(R-L)//2
            if cond(C):
                L=C
            else:
                R=C
         R-L>1 R-L R L 1 C=L+(R-L)//2 C L+(R-L)//2 L (R-L)//2 R-L R L 2 if cond(C):
                L=C
            else:
                R=C
         cond(C) cond C L=C L C R=C R C return L L C=(R-L)/2 C (R-L)/2 R-L R L 2 while (R-C)>ep:
            if cond(C):
                L=C
            else:
                R=C
            C=L+(R-L)/2
         (R-C)>ep R-C R C ep if cond(C):
                L=C
            else:
                R=C
             cond(C) cond C L=C L C R=C R C C=L+(R-L)/2 C L+(R-L)/2 L (R-L)/2 R-L R L 2 return C C L L R R cond cond Integer=True Integer True ep=1/(1<<20) ep 1/(1<<20) 1 1<<20 1 20 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 f(x):
    r=0
    for a in A:
        r+=(a+x-1)//x
    return r-N f r=0 r 0 for a in A:
        r+=(a+x-1)//x
     a A r+=(a+x-1)//x r (a+x-1)//x a+x-1 a+x a x 1 x return r-N r-N r N x x print(-General_Binary_Search(-max(A),-1,lambda x:f(-x)<=K)) print -General_Binary_Search(-max(A),-1,lambda x:f(-x)<=K) General_Binary_Search(-max(A),-1,lambda x:f(-x)<=K) General_Binary_Search -max(A) max(A) max A -1 lambda x:f(-x)<=K f(-x)<=K f(-x) f -x x K x def General_Binary_Search(L,R,cond,Integer=True,ep=1/(1<<20)):
    """一般的な二部探索を行う.
    L:解の下限
    R:解の上限
    cond:条件(1変数関数,単調減少を満たす)
    Integer:解を整数に制限するか?
    ep:Integer=Falseのとき,解の許容する誤差
    """

    if Integer:
        R+=1
        while R-L>1:
            C=L+(R-L)//2
            if cond(C):
                L=C
            else:
                R=C
        return L
    else:
        C=(R-L)/2
        while (R-C)>ep:
            if cond(C):
                L=C
            else:
                R=C
            C=L+(R-L)/2
        return C
#====================================== def General_Binary_Search(L,R,cond,Integer=True,ep=1/(1<<20)):
    """一般的な二部探索を行う.
    L:解の下限
    R:解の上限
    cond:条件(1変数関数,単調減少を満たす)
    Integer:解を整数に制限するか?
    ep:Integer=Falseのとき,解の許容する誤差
    """

    if Integer:
        R+=1
        while R-L>1:
            C=L+(R-L)//2
            if cond(C):
                L=C
            else:
                R=C
        return L
    else:
        C=(R-L)/2
        while (R-C)>ep:
            if cond(C):
                L=C
            else:
                R=C
            C=L+(R-L)/2
        return C
#====================================== General_Binary_Search N,K=map(int,input().split()) map(int,input().split()) N def f(x):
    r=0
    for a in A:
        r+=(a+x-1)//x
    return r-N def f(x):
    r=0
    for a in A:
        r+=(a+x-1)//x
    return r-N f K=map(int,input().split()) map(int,input().split()) K A=list(map(int,input().split())) list(map(int,input().split())) A
def General_Binary_Search(L,R,cond,Integer=True,ep=1/(1<<20)):
    """一般的な二部探索を行う.
    L:解の下限
    R:解の上限
    cond:条件(1変数関数,単調減少を満たす)
    Integer:解を整数に制限するか?
    ep:Integer=Falseのとき,解の許容する誤差
    """

    if Integer:
        R+=1
        while R-L>1:
            C=L+(R-L)//2
            if cond(C):
                L=C
            else:
                R=C
        return L
    else:
        C=(R-L)/2
        while (R-C)>ep:
            if cond(C):
                L=C
            else:
                R=C
            C=L+(R-L)/2
        return C
#======================================
N,K=map(int,input().split())
A=list(map(int,input().split()))

def f(x):
    r=0
    for a in A:
        r+=(a+x-1)//x
    return r-N

print(-General_Binary_Search(-max(A),-1,lambda x:f(-x)<=K))