import sys

n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]

l, r = 0, max(a)
while r - l > 1:
  # satisfy l < t < r
  t = (l + r) // 2
  c = sum([(e-1) // t for e in a])
  if k < c:
    l = t
  else:
    r = t
print(r) import sys sys int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i n, k = [int(i) for i in input().split()] n [int(i) for i in input().split()] k int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a = [int(i) for i in input().split()] a [int(i) for i in input().split()] l, r = 0, max(a) l 0 r max(a) max a while r - l > 1:
  # satisfy l < t < r
  t = (l + r) // 2
  c = sum([(e-1) // t for e in a])
  if k < c:
    l = t
  else:
    r = t r - l > 1 r - l r l 1 t = (l + r) // 2 t (l + r) // 2 l + r l r 2 (e-1) // t for e in a for e in a e a for e in a (e-1) // t e-1 e 1 t c = sum([(e-1) // t for e in a]) c sum([(e-1) // t for e in a]) sum [(e-1) // t for e in a] if k < c:
    l = t
  else:
    r = t k < c k c l = t l t r = t r t print(r) print r a = [int(i) for i in input().split()] [int(i) for i in input().split()] a c = sum([(e-1) // t for e in a]) sum([(e-1) // t for e in a]) c r = 0, max(a) max(a) r k = [int(i) for i in input().split()] [int(i) for i in input().split()] k n, k = [int(i) for i in input().split()] [int(i) for i in input().split()] n l, r = 0, max(a) 0 l r = t t r l = t t l t = (l + r) // 2 (l + r) // 2 t
import sys

n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]

l, r = 0, max(a)
while r - l > 1:
  # satisfy l < t < r
  t = (l + r) // 2
  c = sum([(e-1) // t for e in a])
  if k < c:
    l = t
  else:
    r = t
print(r)