from math import ceil

n, k = map(int, input().split())
logs = list(map(int, input().split()))


def is_ok(num):
  t = 0
  for log in logs:
    if log <= num:
      continue
    t += ceil(log / num) - 1
  return t <= k

ng = 0
ok = 10 ** 9

while ok - ng > 1 :
  m = (ok + ng) // 2
  
  if is_ok(m):
    ok = m
  else:
    ng = m

print(ceil(ok)) from math import ceil n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k logs = list(map(int, input().split())) logs list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def is_ok(num):
  t = 0
  for log in logs:
    if log <= num:
      continue
    t += ceil(log / num) - 1
  return t <= k is_ok t = 0 t 0 for log in logs:
    if log <= num:
      continue
    t += ceil(log / num) - 1
   log logs if log <= num:
      continue
     log <= num log num continue t += ceil(log / num) - 1 t ceil(log / num) - 1 ceil(log / num) ceil log / num log num 1 return t <= k t <= k t k num num ng = 0 ng 0 ok = 10 ** 9 ok 10 ** 9 10 9 while ok - ng > 1 :
  m = (ok + ng) // 2
  
  if is_ok(m):
    ok = m
  else:
    ng = m ok - ng > 1 ok - ng ok ng 1 m = (ok + ng) // 2 m (ok + ng) // 2 ok + ng ok ng 2 if is_ok(m):
    ok = m
  else:
    ng = m is_ok(m) is_ok m ok = m ok m ng = m ng m print(ceil(ok)) print ceil(ok) ceil ok logs = list(map(int, input().split())) list(map(int, input().split())) logs ok = 10 ** 9 10 ** 9 ok m = (ok + ng) // 2 (ok + ng) // 2 m n, k = map(int, input().split()) map(int, input().split()) n ng = 0 0 ng ng = m m ng ok = m m ok k = map(int, input().split()) map(int, input().split()) k def is_ok(num):
  t = 0
  for log in logs:
    if log <= num:
      continue
    t += ceil(log / num) - 1
  return t <= k def is_ok(num):
  t = 0
  for log in logs:
    if log <= num:
      continue
    t += ceil(log / num) - 1
  return t <= k is_ok
from math import ceil

n, k = map(int, input().split())
logs = list(map(int, input().split()))


def is_ok(num):
  t = 0
  for log in logs:
    if log <= num:
      continue
    t += ceil(log / num) - 1
  return t <= k

ng = 0
ok = 10 ** 9

while ok - ng > 1 :
  m = (ok + ng) // 2
  
  if is_ok(m):
    ok = m
  else:
    ng = m

print(ceil(ok))