def main():
    log_no, cut_max = [int(x) for x in input().split()]
    logs = [int(x) for x in input().split()]
    bin_l, bin_r = 0, 10 ** 9
    while bin_r - bin_l > 1:
        bin_mid = (bin_l + bin_r) // 2
        cut_count = sum((log - 1) // bin_mid for log in logs)
        if cut_count <= cut_max:
            bin_r = bin_mid
        else:
            bin_l = bin_mid
    print(bin_r)


if __name__ == '__main__':
    main() def main():
    log_no, cut_max = [int(x) for x in input().split()]
    logs = [int(x) for x in input().split()]
    bin_l, bin_r = 0, 10 ** 9
    while bin_r - bin_l > 1:
        bin_mid = (bin_l + bin_r) // 2
        cut_count = sum((log - 1) // bin_mid for log in logs)
        if cut_count <= cut_max:
            bin_r = bin_mid
        else:
            bin_l = bin_mid
    print(bin_r) main int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x log_no, cut_max = [int(x) for x in input().split()] log_no [int(x) for x in input().split()] cut_max int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x logs = [int(x) for x in input().split()] logs [int(x) for x in input().split()] bin_l, bin_r = 0, 10 ** 9 bin_l 0 bin_r 10 ** 9 10 9 while bin_r - bin_l > 1:
        bin_mid = (bin_l + bin_r) // 2
        cut_count = sum((log - 1) // bin_mid for log in logs)
        if cut_count <= cut_max:
            bin_r = bin_mid
        else:
            bin_l = bin_mid
     bin_r - bin_l > 1 bin_r - bin_l bin_r bin_l 1 bin_mid = (bin_l + bin_r) // 2 bin_mid (bin_l + bin_r) // 2 bin_l + bin_r bin_l bin_r 2 cut_count = sum((log - 1) // bin_mid for log in logs) cut_count sum((log - 1) // bin_mid for log in logs) sum (log - 1) // bin_mid log - 1 log 1 bin_mid if cut_count <= cut_max:
            bin_r = bin_mid
        else:
            bin_l = bin_mid
     cut_count <= cut_max cut_count cut_max bin_r = bin_mid bin_r bin_mid bin_l = bin_mid bin_l bin_mid print(bin_r) print bin_r if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    log_no, cut_max = [int(x) for x in input().split()]
    logs = [int(x) for x in input().split()]
    bin_l, bin_r = 0, 10 ** 9
    while bin_r - bin_l > 1:
        bin_mid = (bin_l + bin_r) // 2
        cut_count = sum((log - 1) // bin_mid for log in logs)
        if cut_count <= cut_max:
            bin_r = bin_mid
        else:
            bin_l = bin_mid
    print(bin_r) def main():
    log_no, cut_max = [int(x) for x in input().split()]
    logs = [int(x) for x in input().split()]
    bin_l, bin_r = 0, 10 ** 9
    while bin_r - bin_l > 1:
        bin_mid = (bin_l + bin_r) // 2
        cut_count = sum((log - 1) // bin_mid for log in logs)
        if cut_count <= cut_max:
            bin_r = bin_mid
        else:
            bin_l = bin_mid
    print(bin_r) main
def main():
    log_no, cut_max = [int(x) for x in input().split()]
    logs = [int(x) for x in input().split()]
    bin_l, bin_r = 0, 10 ** 9
    while bin_r - bin_l > 1:
        bin_mid = (bin_l + bin_r) // 2
        cut_count = sum((log - 1) // bin_mid for log in logs)
        if cut_count <= cut_max:
            bin_r = bin_mid
        else:
            bin_l = bin_mid
    print(bin_r)


if __name__ == '__main__':
    main()
