from math import ceil
n,k=map(int,input().split())
a=list(map(int,input().split()))
l,r=0,10**9
while r-l>1:
    m=(r+l)//2
    count=0
    for i in a:
        count+=ceil(i/m)-1
    if count<=k:
        r=m
    else:
        l=m
print(r) from math import ceil 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 l,r=0,10**9 l 0 r 10**9 10 9 while r-l>1:
    m=(r+l)//2
    count=0
    for i in a:
        count+=ceil(i/m)-1
    if count<=k:
        r=m
    else:
        l=m r-l>1 r-l r l 1 m=(r+l)//2 m (r+l)//2 r+l r l 2 count=0 count 0 for i in a:
        count+=ceil(i/m)-1
     i a count+=ceil(i/m)-1 count ceil(i/m)-1 ceil(i/m) ceil i/m i m 1 if count<=k:
        r=m
    else:
        l=m count<=k count k r=m r m l=m l m print(r) print r l=m m l m=(r+l)//2 (r+l)//2 m a=list(map(int,input().split())) list(map(int,input().split())) a r=0,10**9 10**9 r r=m m r n,k=map(int,input().split()) map(int,input().split()) n k=map(int,input().split()) map(int,input().split()) k count=0 0 count l,r=0,10**9 0 l count+=ceil(i/m)-1 ceil(i/m)-1 count
from math import ceil
n,k=map(int,input().split())
a=list(map(int,input().split()))
l,r=0,10**9
while r-l>1:
    m=(r+l)//2
    count=0
    for i in a:
        count+=ceil(i/m)-1
    if count<=k:
        r=m
    else:
        l=m
print(r)