N,K=map(int,input().split())
l=list(map(int,input().split()))
import math
def f(n):
   A=0
   for i in l:
      A+=math.ceil(i/n)-1
   return A<=K
def bis(ng,ok):
   while abs(ok-ng)>1:
      mid=(ok+ng)//2
      if f(mid):
         ok=mid
      else:
         ng=mid
   return ok
print(bis(0,max(l))) N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K l=list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split import math math def f(n):
   A=0
   for i in l:
      A+=math.ceil(i/n)-1
   return A<=K f A=0 A 0 for i in l:
      A+=math.ceil(i/n)-1
    i l A+=math.ceil(i/n)-1 A math.ceil(i/n)-1 math.ceil(i/n) math.ceil math ceil i/n i n 1 return A<=K A<=K A K n n def bis(ng,ok):
   while abs(ok-ng)>1:
      mid=(ok+ng)//2
      if f(mid):
         ok=mid
      else:
         ng=mid
   return ok bis while abs(ok-ng)>1:
      mid=(ok+ng)//2
      if f(mid):
         ok=mid
      else:
         ng=mid
    abs(ok-ng)>1 abs(ok-ng) abs ok-ng ok ng 1 mid=(ok+ng)//2 mid (ok+ng)//2 ok+ng ok ng 2 if f(mid):
         ok=mid
      else:
         ng=mid
    f(mid) f mid ok=mid ok mid ng=mid ng mid return ok ok ng ng ok ok print(bis(0,max(l))) print bis(0,max(l)) bis 0 max(l) max l def f(n):
   A=0
   for i in l:
      A+=math.ceil(i/n)-1
   return A<=K def f(n):
   A=0
   for i in l:
      A+=math.ceil(i/n)-1
   return A<=K f K=map(int,input().split()) map(int,input().split()) K N,K=map(int,input().split()) map(int,input().split()) N l=list(map(int,input().split())) list(map(int,input().split())) l def bis(ng,ok):
   while abs(ok-ng)>1:
      mid=(ok+ng)//2
      if f(mid):
         ok=mid
      else:
         ng=mid
   return ok def bis(ng,ok):
   while abs(ok-ng)>1:
      mid=(ok+ng)//2
      if f(mid):
         ok=mid
      else:
         ng=mid
   return ok bis
N,K=map(int,input().split())
l=list(map(int,input().split()))
import math
def f(n):
   A=0
   for i in l:
      A+=math.ceil(i/n)-1
   return A<=K
def bis(ng,ok):
   while abs(ok-ng)>1:
      mid=(ok+ng)//2
      if f(mid):
         ok=mid
      else:
         ng=mid
   return ok
print(bis(0,max(l)))