n,k=map(int,input().split())
a=list(map(int,input().split()))
l,r=0,max(a)
def test(x):
  num=0
  for i in a:
    num+=i//x
    if i%x==0:
      num-=1
  if num<=k:
    return num
while r-l>1:
  mid=(l+r)//2
  if test(mid):
    r=mid
  else:
    l=mid
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 l,r=0,max(a) l 0 r max(a) max a def test(x):
  num=0
  for i in a:
    num+=i//x
    if i%x==0:
      num-=1
  if num<=k:
    return num test num=0 num 0 for i in a:
    num+=i//x
    if i%x==0:
      num-=1
   i a num+=i//x num i//x i x if i%x==0:
      num-=1
   i%x==0 i%x i x 0 num-=1 num 1 if num<=k:
    return num num<=k num k return num num x x while r-l>1:
  mid=(l+r)//2
  if test(mid):
    r=mid
  else:
    l=mid r-l>1 r-l r l 1 mid=(l+r)//2 mid (l+r)//2 l+r l r 2 if test(mid):
    r=mid
  else:
    l=mid test(mid) test mid r=mid r mid l=mid l mid print(r) print r r=0,max(a) max(a) r r=mid mid r n,k=map(int,input().split()) map(int,input().split()) n a=list(map(int,input().split())) list(map(int,input().split())) a l=mid mid l l,r=0,max(a) 0 l k=map(int,input().split()) map(int,input().split()) k def test(x):
  num=0
  for i in a:
    num+=i//x
    if i%x==0:
      num-=1
  if num<=k:
    return num def test(x):
  num=0
  for i in a:
    num+=i//x
    if i%x==0:
      num-=1
  if num<=k:
    return num test mid=(l+r)//2 (l+r)//2 mid
n,k=map(int,input().split())
a=list(map(int,input().split()))
l,r=0,max(a)
def test(x):
  num=0
  for i in a:
    num+=i//x
    if i%x==0:
      num-=1
  if num<=k:
    return num
while r-l>1:
  mid=(l+r)//2
  if test(mid):
    r=mid
  else:
    l=mid
print(r)