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

def is_ok(arg):
  cnt=0
  for i in a:
    cnt+=(i-1)//arg
  return k>=cnt
  
def binsearch(ng,ok):
  while abs(ok-ng)>1:
    mid=(ok+ng)//2
    if is_ok(mid):
      ok=mid
    else:
      ng=mid
      
  return ok

print(binsearch(0,10**9+1)) 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 def is_ok(arg):
  cnt=0
  for i in a:
    cnt+=(i-1)//arg
  return k>=cnt
   is_ok cnt=0 cnt 0 for i in a:
    cnt+=(i-1)//arg
   i a cnt+=(i-1)//arg cnt (i-1)//arg i-1 i 1 arg return k>=cnt k>=cnt k cnt arg arg def binsearch(ng,ok):
  while abs(ok-ng)>1:
    mid=(ok+ng)//2
    if is_ok(mid):
      ok=mid
    else:
      ng=mid
      
  return ok binsearch while abs(ok-ng)>1:
    mid=(ok+ng)//2
    if is_ok(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 is_ok(mid):
      ok=mid
    else:
      ng=mid
      
   is_ok(mid) is_ok mid ok=mid ok mid ng=mid ng mid return ok ok ng ng ok ok print(binsearch(0,10**9+1)) print binsearch(0,10**9+1) binsearch 0 10**9+1 10**9 10 9 1 a=list(map(int,input().split())) list(map(int,input().split())) a n,k=map(int,input().split()) map(int,input().split()) n def is_ok(arg):
  cnt=0
  for i in a:
    cnt+=(i-1)//arg
  return k>=cnt
   def is_ok(arg):
  cnt=0
  for i in a:
    cnt+=(i-1)//arg
  return k>=cnt
   is_ok k=map(int,input().split()) map(int,input().split()) k def binsearch(ng,ok):
  while abs(ok-ng)>1:
    mid=(ok+ng)//2
    if is_ok(mid):
      ok=mid
    else:
      ng=mid
      
  return ok def binsearch(ng,ok):
  while abs(ok-ng)>1:
    mid=(ok+ng)//2
    if is_ok(mid):
      ok=mid
    else:
      ng=mid
      
  return ok binsearch
import math
n,k=map(int,input().split())
a=list(map(int,input().split()))

def is_ok(arg):
  cnt=0
  for i in a:
    cnt+=(i-1)//arg
  return k>=cnt
  
def binsearch(ng,ok):
  while abs(ok-ng)>1:
    mid=(ok+ng)//2
    if is_ok(mid):
      ok=mid
    else:
      ng=mid
      
  return ok

print(binsearch(0,10**9+1))