# -*- coding:utf-8 -*-

def solve():
    import math

    N, K = list(map(int, input().split()))
    As = list(map(int, input().split()))

    left, right = 1, 10**9
    while left != right:
        mid = (left+right)//2
        cut = 0

        for a in As:
            if a/mid > 1: cut += math.ceil(a/mid) - 1

        if cut <= K:
            # 切って良い回数を満たしている
            if left+1 == right:
                print(left)
                return
            right = mid
        else:
            # 切って良い回数を満たしていない
            if left+1 == right:
                print(right)
                return
            left = mid



if __name__ == "__main__":
    solve() def solve():
    import math

    N, K = list(map(int, input().split()))
    As = list(map(int, input().split()))

    left, right = 1, 10**9
    while left != right:
        mid = (left+right)//2
        cut = 0

        for a in As:
            if a/mid > 1: cut += math.ceil(a/mid) - 1

        if cut <= K:
            # 切って良い回数を満たしている
            if left+1 == right:
                print(left)
                return
            right = mid
        else:
            # 切って良い回数を満たしていない
            if left+1 == right:
                print(right)
                return
            left = mid solve import math math N, K = list(map(int, input().split())) N list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split K As = list(map(int, input().split())) As list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split left, right = 1, 10**9 left 1 right 10**9 10 9 while left != right:
        mid = (left+right)//2
        cut = 0

        for a in As:
            if a/mid > 1: cut += math.ceil(a/mid) - 1

        if cut <= K:
            # 切って良い回数を満たしている
            if left+1 == right:
                print(left)
                return
            right = mid
        else:
            # 切って良い回数を満たしていない
            if left+1 == right:
                print(right)
                return
            left = mid left != right left right mid = (left+right)//2 mid (left+right)//2 left+right left right 2 cut = 0 cut 0 for a in As:
            if a/mid > 1: cut += math.ceil(a/mid) - 1

         a As if a/mid > 1: cut += math.ceil(a/mid) - 1

         a/mid > 1 a/mid a mid 1 if cut <= K:
            # 切って良い回数を満たしている
            if left+1 == right:
                print(left)
                return
            right = mid
        else:
            # 切って良い回数を満たしていない
            if left+1 == right:
                print(right)
                return
            left = mid cut <= K cut K if left+1 == right:
                print(left)
                return
             left+1 == right left+1 left 1 right print(left) print left return right = mid right mid if left+1 == right:
                print(right)
                return
             left+1 == right left+1 left 1 right print(right) print right return left = mid left mid if __name__ == "__main__":
    solve() __name__ == "__main__" __name__ "__main__" solve() solve def solve():
    import math

    N, K = list(map(int, input().split()))
    As = list(map(int, input().split()))

    left, right = 1, 10**9
    while left != right:
        mid = (left+right)//2
        cut = 0

        for a in As:
            if a/mid > 1: cut += math.ceil(a/mid) - 1

        if cut <= K:
            # 切って良い回数を満たしている
            if left+1 == right:
                print(left)
                return
            right = mid
        else:
            # 切って良い回数を満たしていない
            if left+1 == right:
                print(right)
                return
            left = mid def solve():
    import math

    N, K = list(map(int, input().split()))
    As = list(map(int, input().split()))

    left, right = 1, 10**9
    while left != right:
        mid = (left+right)//2
        cut = 0

        for a in As:
            if a/mid > 1: cut += math.ceil(a/mid) - 1

        if cut <= K:
            # 切って良い回数を満たしている
            if left+1 == right:
                print(left)
                return
            right = mid
        else:
            # 切って良い回数を満たしていない
            if left+1 == right:
                print(right)
                return
            left = mid solve
# -*- coding:utf-8 -*-

def solve():
    import math

    N, K = list(map(int, input().split()))
    As = list(map(int, input().split()))

    left, right = 1, 10**9
    while left != right:
        mid = (left+right)//2
        cut = 0

        for a in As:
            if a/mid > 1: cut += math.ceil(a/mid) - 1

        if cut <= K:
            # 切って良い回数を満たしている
            if left+1 == right:
                print(left)
                return
            right = mid
        else:
            # 切って良い回数を満たしていない
            if left+1 == right:
                print(right)
                return
            left = mid



if __name__ == "__main__":
    solve()
