#!/usr/bin python3
# -*- coding: utf-8 -*-

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

def cnt(x):
  ret = 0
  for ai in a:
    ret += (ai+(x-1))//x - 1
  return ret

ok, ng = a[-1], 0
while ok - ng > 1:
  nw = (ok + ng) // 2
  if cnt(nw)<=k:
    ok = nw
  else:
    ng = nw

print(ok) import bisect bisect n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k a = sorted(list(map(int, input().split()))) a sorted(list(map(int, input().split()))) sorted list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def cnt(x):
  ret = 0
  for ai in a:
    ret += (ai+(x-1))//x - 1
  return ret cnt ret = 0 ret 0 for ai in a:
    ret += (ai+(x-1))//x - 1
   ai a ret += (ai+(x-1))//x - 1 ret (ai+(x-1))//x - 1 (ai+(x-1))//x ai+(x-1) ai x-1 x 1 x 1 return ret ret x x ok, ng = a[-1], 0 ok a[-1] a -1 ng 0 while ok - ng > 1:
  nw = (ok + ng) // 2
  if cnt(nw)<=k:
    ok = nw
  else:
    ng = nw ok - ng > 1 ok - ng ok ng 1 nw = (ok + ng) // 2 nw (ok + ng) // 2 ok + ng ok ng 2 if cnt(nw)<=k:
    ok = nw
  else:
    ng = nw cnt(nw)<=k cnt(nw) cnt nw k ok = nw ok nw ng = nw ng nw print(ok) print ok ok = nw nw ok ng = nw nw ng k = map(int, input().split()) map(int, input().split()) k a = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) a nw = (ok + ng) // 2 (ok + ng) // 2 nw ng = a[-1], 0 0 ng ok, ng = a[-1], 0 a[-1] ok n,k = map(int, input().split()) map(int, input().split()) n def cnt(x):
  ret = 0
  for ai in a:
    ret += (ai+(x-1))//x - 1
  return ret def cnt(x):
  ret = 0
  for ai in a:
    ret += (ai+(x-1))//x - 1
  return ret cnt
#!/usr/bin python3
# -*- coding: utf-8 -*-

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

def cnt(x):
  ret = 0
  for ai in a:
    ret += (ai+(x-1))//x - 1
  return ret

ok, ng = a[-1], 0
while ok - ng > 1:
  nw = (ok + ng) // 2
  if cnt(nw)<=k:
    ok = nw
  else:
    ng = nw

print(ok)
