from math import ceil
N,K=map(int, input().split())

A=list(map(int, input().split()))

left=1
right=10**9+1
ans=float("INF")
while True:
    mid=(left+right)//2
    now=0
    for i in range(N):
        now+=ceil(A[i]/mid)-1

    if now>K:
        if left==mid:
            break
        left=mid
    else:
        ans=min(ans, mid)
        if right==mid:
            break
        right=mid

print(ans) 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 left=1 left 1 right=10**9+1 right 10**9+1 10**9 10 9 1 ans=float("INF") ans float("INF") float "INF" while True:
    mid=(left+right)//2
    now=0
    for i in range(N):
        now+=ceil(A[i]/mid)-1

    if now>K:
        if left==mid:
            break
        left=mid
    else:
        ans=min(ans, mid)
        if right==mid:
            break
        right=mid True mid=(left+right)//2 mid (left+right)//2 left+right left right 2 now=0 now 0 for i in range(N):
        now+=ceil(A[i]/mid)-1

     i range(N) range N now+=ceil(A[i]/mid)-1 now ceil(A[i]/mid)-1 ceil(A[i]/mid) ceil A[i]/mid A[i] A i mid 1 if now>K:
        if left==mid:
            break
        left=mid
    else:
        ans=min(ans, mid)
        if right==mid:
            break
        right=mid now>K now K if left==mid:
            break
         left==mid left mid break left=mid left mid ans=min(ans, mid) ans min(ans, mid) min ans mid if right==mid:
            break
         right==mid right mid break right=mid right mid print(ans) print ans K=map(int, input().split()) map(int, input().split()) K left=1 1 left A=list(map(int, input().split())) list(map(int, input().split())) A now=0 0 now now+=ceil(A[i]/mid)-1 ceil(A[i]/mid)-1 now ans=min(ans, mid) min(ans, mid) ans right=mid mid right ans=float("INF") float("INF") ans left=mid mid left right=10**9+1 10**9+1 right N,K=map(int, input().split()) map(int, input().split()) N mid=(left+right)//2 (left+right)//2 mid
from math import ceil
N,K=map(int, input().split())

A=list(map(int, input().split()))

left=1
right=10**9+1
ans=float("INF")
while True:
    mid=(left+right)//2
    now=0
    for i in range(N):
        now+=ceil(A[i]/mid)-1

    if now>K:
        if left==mid:
            break
        left=mid
    else:
        ans=min(ans, mid)
        if right==mid:
            break
        right=mid

print(ans)