import math
n,k=map(int,input().split())
a=list(map(int,input().split()))

x0, x1 = 0, 10**9
while x0 + 1  < x1:
  x = (x0+x1)//2
  suma=0
  for i in a:
    if i%x==0:
      suma+=(i//x)-1
    else:
      suma += (i//x)
    
  if suma > k:
    x0 = x
  else:
    x1 = x
print(x1) import math math 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 x0, x1 = 0, 10**9 x0 0 x1 10**9 10 9 while x0 + 1  < x1:
  x = (x0+x1)//2
  suma=0
  for i in a:
    if i%x==0:
      suma+=(i//x)-1
    else:
      suma += (i//x)
    
  if suma > k:
    x0 = x
  else:
    x1 = x x0 + 1  < x1 x0 + 1 x0 1 x1 x = (x0+x1)//2 x (x0+x1)//2 x0+x1 x0 x1 2 suma=0 suma 0 for i in a:
    if i%x==0:
      suma+=(i//x)-1
    else:
      suma += (i//x)
    
   i a if i%x==0:
      suma+=(i//x)-1
    else:
      suma += (i//x)
    
   i%x==0 i%x i x 0 suma+=(i//x)-1 suma (i//x)-1 i//x i x 1 suma += (i//x) suma i//x i x if suma > k:
    x0 = x
  else:
    x1 = x suma > k suma k x0 = x x0 x x1 = x x1 x print(x1) print x1 suma += (i//x) i//x suma x0 = x x x0 k=map(int,input().split()) map(int,input().split()) k x1 = 0, 10**9 10**9 x1 suma+=(i//x)-1 (i//x)-1 suma a=list(map(int,input().split())) list(map(int,input().split())) a x = (x0+x1)//2 (x0+x1)//2 x x0, x1 = 0, 10**9 0 x0 suma=0 0 suma n,k=map(int,input().split()) map(int,input().split()) n x1 = x x x1
import math
n,k=map(int,input().split())
a=list(map(int,input().split()))

x0, x1 = 0, 10**9
while x0 + 1  < x1:
  x = (x0+x1)//2
  suma=0
  for i in a:
    if i%x==0:
      suma+=(i//x)-1
    else:
      suma += (i//x)
    
  if suma > k:
    x0 = x
  else:
    x1 = x
print(x1)
