n, k = map(int, raw_input().split())
logs = map(int, raw_input().split())

l = 0
r = 10**9


def check(v):
    c = k
    for i in logs:
        if i%v==0:
            p=i/v
        else:
            p=i/v+1
        if(p-1 <= c):
            c -= p-1
        else:
            return 0
    return 1


ans = 10**9
while l+1<r:
    mid = (l+r)/2
    if(check(mid)):
        ans = min(ans, mid)
        r = mid
    else:
        l = mid
print ans n, k = map(int, raw_input().split()) n map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split k logs = map(int, raw_input().split()) logs map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split l = 0 l 0 r = 10**9 r 10**9 10 9 def check(v):
    c = k
    for i in logs:
        if i%v==0:
            p=i/v
        else:
            p=i/v+1
        if(p-1 <= c):
            c -= p-1
        else:
            return 0
    return 1 check c = k c k for i in logs:
        if i%v==0:
            p=i/v
        else:
            p=i/v+1
        if(p-1 <= c):
            c -= p-1
        else:
            return 0
     i logs if i%v==0:
            p=i/v
        else:
            p=i/v+1
         i%v==0 i%v i v 0 p=i/v p i/v i v p=i/v+1 p i/v+1 i/v i v 1 if(p-1 <= c):
            c -= p-1
        else:
            return 0
     p-1 <= c p-1 p 1 c c -= p-1 c p-1 p 1 return 0 0 return 1 1 v v ans = 10**9 ans 10**9 10 9 while l+1<r:
    mid = (l+r)/2
    if(check(mid)):
        ans = min(ans, mid)
        r = mid
    else:
        l = mid l+1<r l+1 l 1 r mid = (l+r)/2 mid (l+r)/2 l+r l r 2 if(check(mid)):
        ans = min(ans, mid)
        r = mid
    else:
        l = mid check(mid) check mid ans = min(ans, mid) ans min(ans, mid) min ans mid r = mid r mid l = mid l mid print ans = 10**9 10**9 ans l = mid mid l r = mid mid r n, k = map(int, raw_input().split()) map(int, raw_input().split()) n r = 10**9 10**9 r k = map(int, raw_input().split()) map(int, raw_input().split()) k mid = (l+r)/2 (l+r)/2 mid def check(v):
    c = k
    for i in logs:
        if i%v==0:
            p=i/v
        else:
            p=i/v+1
        if(p-1 <= c):
            c -= p-1
        else:
            return 0
    return 1 def check(v):
    c = k
    for i in logs:
        if i%v==0:
            p=i/v
        else:
            p=i/v+1
        if(p-1 <= c):
            c -= p-1
        else:
            return 0
    return 1 check ans = min(ans, mid) min(ans, mid) ans logs = map(int, raw_input().split()) map(int, raw_input().split()) logs l = 0 0 l
n, k = map(int, raw_input().split())
logs = map(int, raw_input().split())

l = 0
r = 10**9


def check(v):
    c = k
    for i in logs:
        if i%v==0:
            p=i/v
        else:
            p=i/v+1
        if(p-1 <= c):
            c -= p-1
        else:
            return 0
    return 1


ans = 10**9
while l+1<r:
    mid = (l+r)/2
    if(check(mid)):
        ans = min(ans, mid)
        r = mid
    else:
        l = mid
print ans
