N,K=list(map(int,input().split()))

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

#print(alist)



def num_cut(x):

  if x==0:

    return float("inf")

  

  ret=0

  for a in alist:

    ret+=-(-(a-x)//x)

  return ret



#for i in range(1,max(alist)):

#  print(i,num_cut(i))



l=1

r=max(alist)+1

while l<=r:

  mid=(l+r)//2

  #print(l,mid,r)

  

  if num_cut(mid-1)>K and num_cut(mid)<=K:

    print(mid)

    break

  elif num_cut(mid)<=K:

    r=mid

  else:

    l=mid
N,K=list(map(int,input().split()))

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

#print(alist)



memo={0:False}

def isOK(x):

  if x in memo:

    return memo[x]

  

  num_cut=0

  for a in alist:

    num_cut+=-(-(a-x)//x)

    if num_cut>K:

      memo[x]=False

      return False  

    

  memo[x]=True

  return True



l=1

r=max(alist)+1

while l<=r:

  mid=(l+r)//2

  

  if not isOK(mid-1) and isOK(mid):

    print(mid)

    break

  elif isOK(mid-1):

    r=mid

  else:

    l=mid
N, K = list(map(int, input().split()))
alist = list(map(int, input().split()))
# print(alist)
def num_cut(x):
    if x == 0:
        return float("inf")
    ret = 0
    for a in alist:
        ret += -(-(a - x) // x)
    return ret


# for i in range(1,max(alist)):
#  print(i,num_cut(i))
l = 1
r = max(alist) + 1
while l <= r:
    mid = (l + r) // 2
    # print(l,mid,r)
    if num_cut(mid - 1) > K and num_cut(mid) <= K:
        print(mid)
        break
    elif num_cut(mid) <= K:
        r = mid
    else:
        l = mid

N, K = list(map(int, input().split()))
alist = list(map(int, input().split()))
# print(alist)
memo = {0: False}


def isOK(x):
    if x in memo:
        return memo[x]
    num_cut = 0
    for a in alist:
        num_cut += -(-(a - x) // x)
        if num_cut > K:
            memo[x] = False
            return False
    memo[x] = True
    return True


l = 1
r = max(alist) + 1
while l <= r:
    mid = (l + r) // 2
    if not isOK(mid - 1) and isOK(mid):
        print(mid)
        break
    elif isOK(mid - 1):
        r = mid
    else:
        l = mid

-def num_cut(x): -    if x == 0: -        return float("inf") -    ret = 0 -    for a in alist: -        ret += -(-(a - x) // x) -    return ret +memo = {0: False} -# for i in range(1,max(alist)): -#  print(i,num_cut(i)) +def isOK(x): +    if x in memo: +        return memo[x] +    num_cut = 0 +    for a in alist: +        num_cut += -(-(a - x) // x) +        if num_cut > K: +            memo[x] = False +            return False +    memo[x] = True +    return True + + -    # print(l,mid,r) -    if num_cut(mid - 1) > K and num_cut(mid) <= K: +    if not isOK(mid - 1) and isOK(mid): -    elif num_cut(mid) <= K: +    elif isOK(mid - 1):