import sys
import numpy as np
import math
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))
n,k = Mi()
a = np.array(sys.stdin.readline().split(), np.int64)
maxa = np.max(a)
mina = maxa//(k+1)
while maxa > mina+1:
  mid = (mina+maxa)//2
  div = np.sum(np.ceil(a/mid-1))
  if div > k:
    mina = mid
  else:
    maxa = mid
  
print(maxa) import sys sys import numpy as np numpy import math math def Ii():return int(sys.stdin.readline()) Ii def Mi():return map(int,sys.stdin.readline().split()) Mi def Li():return list(map(int,sys.stdin.readline().split())) Li n,k = Mi() n Mi() Mi k a = np.array(sys.stdin.readline().split(), np.int64) a np.array(sys.stdin.readline().split(), np.int64) np.array np array sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split np.int64 np int64 maxa = np.max(a) maxa np.max(a) np.max np max a mina = maxa//(k+1) mina maxa//(k+1) maxa k+1 k 1 while maxa > mina+1:
  mid = (mina+maxa)//2
  div = np.sum(np.ceil(a/mid-1))
  if div > k:
    mina = mid
  else:
    maxa = mid
   maxa > mina+1 maxa mina+1 mina 1 mid = (mina+maxa)//2 mid (mina+maxa)//2 mina+maxa mina maxa 2 div = np.sum(np.ceil(a/mid-1)) div np.sum(np.ceil(a/mid-1)) np.sum np sum np.ceil(a/mid-1) np.ceil np ceil a/mid-1 a/mid a mid 1 if div > k:
    mina = mid
  else:
    maxa = mid
   div > k div k mina = mid mina mid maxa = mid maxa mid print(maxa) print maxa maxa = mid mid maxa def Li():return list(map(int,sys.stdin.readline().split())) def Li():return list(map(int,sys.stdin.readline().split())) Li mina = maxa//(k+1) maxa//(k+1) mina n,k = Mi() Mi() n def Ii():return int(sys.stdin.readline()) def Ii():return int(sys.stdin.readline()) Ii k = Mi() Mi() k def Mi():return map(int,sys.stdin.readline().split()) def Mi():return map(int,sys.stdin.readline().split()) Mi a = np.array(sys.stdin.readline().split(), np.int64) np.array(sys.stdin.readline().split(), np.int64) a maxa = np.max(a) np.max(a) maxa mid = (mina+maxa)//2 (mina+maxa)//2 mid div = np.sum(np.ceil(a/mid-1)) np.sum(np.ceil(a/mid-1)) div mina = mid mid mina
import sys
import numpy as np
import math
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))
n,k = Mi()
a = np.array(sys.stdin.readline().split(), np.int64)
maxa = np.max(a)
mina = maxa//(k+1)
while maxa > mina+1:
  mid = (mina+maxa)//2
  div = np.sum(np.ceil(a/mid-1))
  if div > k:
    mina = mid
  else:
    maxa = mid
  
print(maxa)