import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase


"""def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)"""

"""def pw(a,b):
    result=1
    while(b>0):
        if(b%2==1): result*=a
        a*=a
        b//=2
    return result"""



def inpt():
    return [int(k) for k in input().split()]

def check(mid,k,ar):
    ct=k
    for i in ar:
        if(i<=mid):
            continue
        ct-=(i//mid)
    return ct>=0
def main():
    n,k=map(int,input().split())
    ar=inpt()
    i,j=1,100000000000
    while(i<j):
        mid=(i+j)//2
        if(check(mid,k,ar)):
            j=mid
        else:
            i=mid+1
    print(i)

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main() import os os import heapq heapq import sys sys import math math import operator operator from collections import defaultdict from io import BytesIO, IOBase """def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)""" """def pw(a,b):
    result=1
    while(b>0):
        if(b%2==1): result*=a
        a*=a
        b//=2
    return result""" def inpt():
    return [int(k) for k in input().split()] inpt int(k) for k in input().split() for k in input().split() k input().split() ().split () input split for k in input().split() int(k) int k return [int(k) for k in input().split()] [int(k) for k in input().split()] def check(mid,k,ar):
    ct=k
    for i in ar:
        if(i<=mid):
            continue
        ct-=(i//mid)
    return ct>=0 check ct=k ct k for i in ar:
        if(i<=mid):
            continue
        ct-=(i//mid)
     i ar if(i<=mid):
            continue
         i<=mid i mid continue ct-=(i//mid) ct i//mid i mid return ct>=0 ct>=0 ct 0 mid mid k k ar ar def main():
    n,k=map(int,input().split())
    ar=inpt()
    i,j=1,100000000000
    while(i<j):
        mid=(i+j)//2
        if(check(mid,k,ar)):
            j=mid
        else:
            i=mid+1
    print(i) main n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k ar=inpt() ar inpt() inpt i,j=1,100000000000 i 1 j 100000000000 while(i<j):
        mid=(i+j)//2
        if(check(mid,k,ar)):
            j=mid
        else:
            i=mid+1
     i<j i j mid=(i+j)//2 mid (i+j)//2 i+j i j 2 if(check(mid,k,ar)):
            j=mid
        else:
            i=mid+1
     check(mid,k,ar) check mid k ar j=mid j mid i=mid+1 i mid+1 mid 1 print(i) print i BUFSIZE = 8192 BUFSIZE 8192 class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0) FastIO newlines = 0 newlines 0 def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

     __init__ self._fd = file.fileno() self._fd self _fd file.fileno() file.fileno file fileno self.buffer = BytesIO() self.buffer self buffer BytesIO() BytesIO self.writable = "x" in file.mode or "r" not in file.mode self.writable self writable "x" in file.mode or "r" not in file.mode "x" in file.mode "x" file.mode file mode "r" not in file.mode "r" file.mode file mode self.write = self.buffer.write if self.writable else None self.write self write self.buffer.write if self.writable else None self.writable self writable self.buffer.write self.buffer self buffer write None self self file file def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

     read while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
         True b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) b os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) os.read os read self._fd self _fd max(os.fstat(self._fd).st_size, BUFSIZE) max os.fstat(self._fd).st_size os.fstat(self._fd) os.fstat os fstat self._fd self _fd st_size BUFSIZE if not b:
                break
             not b b break ptr = self.buffer.tell() ptr self.buffer.tell() self.buffer.tell self.buffer self buffer tell self.buffer.seek(0, 2) self.buffer.seek self.buffer self buffer seek 0 2 self.buffer.write(b) self.buffer.write self.buffer self buffer write b self.buffer.seek(ptr) self.buffer.seek self.buffer self buffer seek ptr self.newlines = 0 self.newlines self newlines 0 return self.buffer.read() self.buffer.read() self.buffer.read self.buffer self buffer read self self def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

     readline while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
         self.newlines == 0 self.newlines self newlines 0 b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) b os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)) os.read os read self._fd self _fd max(os.fstat(self._fd).st_size, BUFSIZE) max os.fstat(self._fd).st_size os.fstat(self._fd) os.fstat os fstat self._fd self _fd st_size BUFSIZE self.newlines = b.count(b"\n") + (not b) self.newlines self newlines b.count(b"\n") + (not b) b.count(b"\n") b.count b count b"\n" not b b ptr = self.buffer.tell() ptr self.buffer.tell() self.buffer.tell self.buffer self buffer tell self.buffer.seek(0, 2) self.buffer.seek self.buffer self buffer seek 0 2 self.buffer.write(b) self.buffer.write self.buffer self buffer write b self.buffer.seek(ptr) self.buffer.seek self.buffer self buffer seek ptr self.newlines -= 1 self.newlines self newlines 1 return self.buffer.readline() self.buffer.readline() self.buffer.readline self.buffer self buffer readline self self def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0) flush if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0) self.writable self writable os.write(self._fd, self.buffer.getvalue()) os.write os write self._fd self _fd self.buffer.getvalue() self.buffer.getvalue self.buffer self buffer getvalue self.buffer.truncate(0) self.buffer.truncate self.buffer self buffer truncate 0 self.buffer.seek(0) self.buffer.seek self.buffer self buffer seek 0 self self IOBase class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii") IOWrapper def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii") __init__ self.buffer = FastIO(file) self.buffer self buffer FastIO(file) FastIO file self.flush = self.buffer.flush self.flush self flush self.buffer.flush self.buffer self buffer flush self.writable = self.buffer.writable self.writable self writable self.buffer.writable self.buffer self buffer writable self.write = lambda s: self.buffer.write(s.encode("ascii")) self.write self write lambda s: self.buffer.write(s.encode("ascii")) self.buffer.write(s.encode("ascii")) self.buffer.write self.buffer self buffer write s.encode("ascii") s.encode s encode "ascii" s self.read = lambda: self.buffer.read().decode("ascii") self.read self read lambda: self.buffer.read().decode("ascii") self.buffer.read().decode("ascii") self.buffer.read().decode self.buffer.read() self.buffer.read self.buffer self buffer read decode "ascii" self.readline = lambda: self.buffer.readline().decode("ascii") self.readline self readline lambda: self.buffer.readline().decode("ascii") self.buffer.readline().decode("ascii") self.buffer.readline().decode self.buffer.readline() self.buffer.readline self.buffer self buffer readline decode "ascii" self self file file IOBase sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout) sys.stdin sys stdin IOWrapper(sys.stdin) IOWrapper sys.stdin sys stdin sys.stdout sys stdout IOWrapper(sys.stdout) IOWrapper sys.stdout sys stdout input = lambda: sys.stdin.readline().rstrip("\r\n") input lambda: sys.stdin.readline().rstrip("\r\n") sys.stdin.readline().rstrip("\r\n") sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip "\r\n" if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def check(mid,k,ar):
    ct=k
    for i in ar:
        if(i<=mid):
            continue
        ct-=(i//mid)
    return ct>=0 def check(mid,k,ar):
    ct=k
    for i in ar:
        if(i<=mid):
            continue
        ct-=(i//mid)
    return ct>=0 check class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0) class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0) FastIO class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii") class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii") IOWrapper BUFSIZE = 8192 8192 BUFSIZE input = lambda: sys.stdin.readline().rstrip("\r\n") lambda: sys.stdin.readline().rstrip("\r\n") input def main():
    n,k=map(int,input().split())
    ar=inpt()
    i,j=1,100000000000
    while(i<j):
        mid=(i+j)//2
        if(check(mid,k,ar)):
            j=mid
        else:
            i=mid+1
    print(i) def main():
    n,k=map(int,input().split())
    ar=inpt()
    i,j=1,100000000000
    while(i<j):
        mid=(i+j)//2
        if(check(mid,k,ar)):
            j=mid
        else:
            i=mid+1
    print(i) main def inpt():
    return [int(k) for k in input().split()] def inpt():
    return [int(k) for k in input().split()] inpt
import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase


"""def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)"""

"""def pw(a,b):
    result=1
    while(b>0):
        if(b%2==1): result*=a
        a*=a
        b//=2
    return result"""



def inpt():
    return [int(k) for k in input().split()]

def check(mid,k,ar):
    ct=k
    for i in ar:
        if(i<=mid):
            continue
        ct-=(i//mid)
    return ct>=0
def main():
    n,k=map(int,input().split())
    ar=inpt()
    i,j=1,100000000000
    while(i<j):
        mid=(i+j)//2
        if(check(mid,k,ar)):
            j=mid
        else:
            i=mid+1
    print(i)

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main()
