# coding: utf-8
import numpy as np


def solve(*args: str) -> str:
    n, k = map(int, args[0].split())
    A = np.array(tuple(map(int, args[1].split())))

    l, r = 0, np.max(A)
    while l+1 < r:
        m = (l+r)//2
        if k < np.sum(np.ceil(A/m)-1):
            l = m
        else:
            r = m

    return str(r)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines()))) import numpy as np numpy def solve(*args: str) -> str:
    n, k = map(int, args[0].split())
    A = np.array(tuple(map(int, args[1].split())))

    l, r = 0, np.max(A)
    while l+1 < r:
        m = (l+r)//2
        if k < np.sum(np.ceil(A/m)-1):
            l = m
        else:
            r = m

    return str(r) solve n, k = map(int, args[0].split()) n map(int, args[0].split()) map int args[0].split() [0].split [0] args 0 split k A = np.array(tuple(map(int, args[1].split()))) A np.array(tuple(map(int, args[1].split()))) np.array np array tuple(map(int, args[1].split())) tuple map(int, args[1].split()) map int args[1].split() [1].split [1] args 1 split l, r = 0, np.max(A) l 0 r np.max(A) np.max np max A while l+1 < r:
        m = (l+r)//2
        if k < np.sum(np.ceil(A/m)-1):
            l = m
        else:
            r = m

     l+1 < r l+1 l 1 r m = (l+r)//2 m (l+r)//2 l+r l r 2 if k < np.sum(np.ceil(A/m)-1):
            l = m
        else:
            r = m

     k < np.sum(np.ceil(A/m)-1) k np.sum(np.ceil(A/m)-1) np.sum np sum np.ceil(A/m)-1 np.ceil(A/m) np.ceil np ceil A/m A m 1 l = m l m r = m r m return str(r) str(r) str r *args: str if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines()))) __name__ == "__main__" __name__ "__main__" print(solve(*(open(0).read().splitlines()))) print solve(*(open(0).read().splitlines())) solve *(open(0).read().splitlines()) open(0).read().splitlines() (0).read().splitlines (0).read() (0).read (0) open 0 read splitlines def solve(*args: str) -> str:
    n, k = map(int, args[0].split())
    A = np.array(tuple(map(int, args[1].split())))

    l, r = 0, np.max(A)
    while l+1 < r:
        m = (l+r)//2
        if k < np.sum(np.ceil(A/m)-1):
            l = m
        else:
            r = m

    return str(r) def solve(*args: str) -> str:
    n, k = map(int, args[0].split())
    A = np.array(tuple(map(int, args[1].split())))

    l, r = 0, np.max(A)
    while l+1 < r:
        m = (l+r)//2
        if k < np.sum(np.ceil(A/m)-1):
            l = m
        else:
            r = m

    return str(r) solve
# coding: utf-8
import numpy as np


def solve(*args: str) -> str:
    n, k = map(int, args[0].split())
    A = np.array(tuple(map(int, args[1].split())))

    l, r = 0, np.max(A)
    while l+1 < r:
        m = (l+r)//2
        if k < np.sum(np.ceil(A/m)-1):
            l = m
        else:
            r = m

    return str(r)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))
