n,k,*a = map(int,open(0).read().split())
def func(b):
  c = k
  for i in a:
    c -= (i-1)//b
    if c < 0:
      return False
  return True
l = 1
r = max(a)
while(r>l):
  lr = (l+r)//2
  if func(lr):
    r = lr
  else:
    l = lr + 1
print(r) n,k,*a = map(int,open(0).read().split()) n map(int,open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split k *a a def func(b):
  c = k
  for i in a:
    c -= (i-1)//b
    if c < 0:
      return False
  return True func c = k c k for i in a:
    c -= (i-1)//b
    if c < 0:
      return False
   i a c -= (i-1)//b c (i-1)//b i-1 i 1 b if c < 0:
      return False
   c < 0 c 0 return False False return True True b b l = 1 l 1 r = max(a) r max(a) max a while(r>l):
  lr = (l+r)//2
  if func(lr):
    r = lr
  else:
    l = lr + 1 r>l r l lr = (l+r)//2 lr (l+r)//2 l+r l r 2 if func(lr):
    r = lr
  else:
    l = lr + 1 func(lr) func lr r = lr r lr l = lr + 1 l lr + 1 lr 1 print(r) print r l = lr + 1 lr + 1 l n,k,*a = map(int,open(0).read().split()) map(int,open(0).read().split()) n k,*a = map(int,open(0).read().split()) map(int,open(0).read().split()) k r = max(a) max(a) r def func(b):
  c = k
  for i in a:
    c -= (i-1)//b
    if c < 0:
      return False
  return True def func(b):
  c = k
  for i in a:
    c -= (i-1)//b
    if c < 0:
      return False
  return True func r = lr lr r lr = (l+r)//2 (l+r)//2 lr l = 1 1 l
n,k,*a = map(int,open(0).read().split())
def func(b):
  c = k
  for i in a:
    c -= (i-1)//b
    if c < 0:
      return False
  return True
l = 1
r = max(a)
while(r>l):
  lr = (l+r)//2
  if func(lr):
    r = lr
  else:
    l = lr + 1
print(r)