N, K = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
 
def isfeasible(L):
  k = 0
  for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
  return True
 
l = 0
r = A[0]

while r-l>1:
  L = (r+l)//2
  if isfeasible(L):
    r = L
  else:
    l = L
print(r) 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 A.sort(reverse=True) A.sort A sort reverse=True reverse True def isfeasible(L):
  k = 0
  for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
  return True
  isfeasible k = 0 k 0 for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
   a A if a < L:
      break
     a < L a L break if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
     a%L == 0 a%L a L 0 dk = a//L - 1 dk a//L - 1 a//L a L 1 dk = a//L dk a//L a L k += dk k dk if k > K:
      return False
   k > K k K return False False return True True L L l = 0 l 0 r = A[0] r A[0] A 0 while r-l>1:
  L = (r+l)//2
  if isfeasible(L):
    r = L
  else:
    l = L r-l>1 r-l r l 1 L = (r+l)//2 L (r+l)//2 r+l r l 2 if isfeasible(L):
    r = L
  else:
    l = L isfeasible(L) isfeasible L r = L r L l = L l L print(r) print r r = A[0] A[0] r K = map(int, input().split()) map(int, input().split()) K r = L L r N, K = map(int, input().split()) map(int, input().split()) N L = (r+l)//2 (r+l)//2 L l = 0 0 l l = L L l A = list(map(int, input().split())) list(map(int, input().split())) A def isfeasible(L):
  k = 0
  for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
  return True
  def isfeasible(L):
  k = 0
  for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
  return True
  isfeasible
N, K = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
 
def isfeasible(L):
  k = 0
  for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
  return True
 
l = 0
r = A[0]

while r-l>1:
  L = (r+l)//2
  if isfeasible(L):
    r = L
  else:
    l = L
print(r)