# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
def main(N, K, A):
    lo = 0
    hi = 10**9
    while hi - lo > 1:
        m = (lo + hi) // 2
        if sum((a + m - 1) // m - 1 for a in A) <= K: hi = m
        else: lo = m
    print(hi)

if __name__ == '__main__':
    input = sys.stdin.readline
    N, K = map(int, input().split())
    *A, = map(int, input().split())
    main(N, K, A) import sys sys def main(N, K, A):
    lo = 0
    hi = 10**9
    while hi - lo > 1:
        m = (lo + hi) // 2
        if sum((a + m - 1) // m - 1 for a in A) <= K: hi = m
        else: lo = m
    print(hi) main lo = 0 lo 0 hi = 10**9 hi 10**9 10 9 while hi - lo > 1:
        m = (lo + hi) // 2
        if sum((a + m - 1) // m - 1 for a in A) <= K: hi = m
        else: lo = m
     hi - lo > 1 hi - lo hi lo 1 m = (lo + hi) // 2 m (lo + hi) // 2 lo + hi lo hi 2 if sum((a + m - 1) // m - 1 for a in A) <= K: hi = m
        else: lo = m
     sum((a + m - 1) // m - 1 for a in A) <= K sum((a + m - 1) // m - 1 for a in A) sum (a + m - 1) // m - 1 (a + m - 1) // m a + m - 1 a + m a m 1 m 1 K print(hi) print hi N N K K A A if __name__ == '__main__':
    input = sys.stdin.readline
    N, K = map(int, input().split())
    *A, = map(int, input().split())
    main(N, K, A) __name__ == '__main__' __name__ '__main__' input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K *A, = map(int, input().split()) *A A map(int, input().split()) map int input().split() ().split () input split main(N, K, A) main N K A N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K input = sys.stdin.readline sys.stdin.readline input def main(N, K, A):
    lo = 0
    hi = 10**9
    while hi - lo > 1:
        m = (lo + hi) // 2
        if sum((a + m - 1) // m - 1 for a in A) <= K: hi = m
        else: lo = m
    print(hi) def main(N, K, A):
    lo = 0
    hi = 10**9
    while hi - lo > 1:
        m = (lo + hi) // 2
        if sum((a + m - 1) // m - 1 for a in A) <= K: hi = m
        else: lo = m
    print(hi) main
# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
def main(N, K, A):
    lo = 0
    hi = 10**9
    while hi - lo > 1:
        m = (lo + hi) // 2
        if sum((a + m - 1) // m - 1 for a in A) <= K: hi = m
        else: lo = m
    print(hi)

if __name__ == '__main__':
    input = sys.stdin.readline
    N, K = map(int, input().split())
    *A, = map(int, input().split())
    main(N, K, A)
