import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans


def nibu(x,n,r):
    ll = 1
    rr = r
    while True:
        mid = (ll+rr)//2
        
        if rr == mid:
            return ll
        
        if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1

def cou(x,le):
    co = 0
    for i in range(len(x)):
        if le != 0:
            co += -(-x[i]//le) - 1
    return co


n,k = m()

a = l()

left = 0

right = 10**9


aaa = nibu(a,k,right)
print(aaa) import sys,collections as cl,bisect as bs sys collections bisect sys.setrecursionlimit(100000) sys.setrecursionlimit sys setrecursionlimit 100000 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline mod = 10**9+7 mod 10**9+7 10**9 10 9 7 Max = sys.maxsize Max sys.maxsize sys maxsize def l(): #intのlist
    return list(map(int,input().split())) l return list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def m(): #複数文字
    return map(int,input().split()) m return map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split def onem(): #Nとかの取得
    return int(input()) onem return int(input()) int(input()) int input() input def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a s a = [] a [] if len(x) == 0:
        return []
     len(x) == 0 len(x) len x 0 return [] [] aa = x[0] aa x[0] x 0 su = 1 su 1 for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
     i range(len(x)-1) range len(x)-1 len(x) len x 1 if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
     aa != x[i+1] aa x[i+1] x i+1 i 1 a.append([aa,su]) a.append a append [aa,su] aa su aa = x[i+1] aa x[i+1] x i+1 i 1 su = 1 su 1 su += 1 su 1 a.append([aa,su]) a.append a append [aa,su] aa su return a a x x def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x)) jo return " ".join(map(str,x)) " ".join(map(str,x)) " ".join " " join map(str,x) map str x x x def max2(x): #他のときもどうように作成可能
    return max(map(max,x)) max2 return max(map(max,x)) max(map(max,x)) max map(max,x) map max x x x def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False In k = bs.bisect_left(a,x) k bs.bisect_left(a,x) bs.bisect_left bs bisect_left a x if k != len(a) and a[k] ==  x:
        return True
    else:
        return False k != len(a) and a[k] ==  x k != len(a) k len(a) len a a[k] ==  x a[k] a k x return True True return False False x x a a def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans pow_k ans = 1 ans 1 while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
     n if n % 2:
            ans *= x
         n % 2 n 2 ans *= x ans x x *= x x x n >>= 1 n 1 return ans ans x x n n def nibu(x,n,r):
    ll = 1
    rr = r
    while True:
        mid = (ll+rr)//2
        
        if rr == mid:
            return ll
        
        if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1 nibu ll = 1 ll 1 rr = r rr r while True:
        mid = (ll+rr)//2
        
        if rr == mid:
            return ll
        
        if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1 True mid = (ll+rr)//2 mid (ll+rr)//2 ll+rr ll rr 2 if rr == mid:
            return ll
        
         rr == mid rr mid return ll ll if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1 cou(x,mid) <= n cou(x,mid) cou x mid n rr = mid rr mid ll = mid+1 ll mid+1 mid 1 x x n n r r def cou(x,le):
    co = 0
    for i in range(len(x)):
        if le != 0:
            co += -(-x[i]//le) - 1
    return co cou co = 0 co 0 for i in range(len(x)):
        if le != 0:
            co += -(-x[i]//le) - 1
     i range(len(x)) range len(x) len x if le != 0:
            co += -(-x[i]//le) - 1
     le != 0 le 0 co += -(-x[i]//le) - 1 co -(-x[i]//le) - 1 -(-x[i]//le) -x[i]//le -x[i] x[i] x i le 1 return co co x x le le n,k = m() n m() m k a = l() a l() l left = 0 left 0 right = 10**9 right 10**9 10 9 aaa = nibu(a,k,right) aaa nibu(a,k,right) nibu a k right print(aaa) print aaa def nibu(x,n,r):
    ll = 1
    rr = r
    while True:
        mid = (ll+rr)//2
        
        if rr == mid:
            return ll
        
        if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1 def nibu(x,n,r):
    ll = 1
    rr = r
    while True:
        mid = (ll+rr)//2
        
        if rr == mid:
            return ll
        
        if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1 nibu def m(): #複数文字
    return map(int,input().split()) def m(): #複数文字
    return map(int,input().split()) m mod = 10**9+7 10**9+7 mod def l(): #intのlist
    return list(map(int,input().split())) def l(): #intのlist
    return list(map(int,input().split())) l def onem(): #Nとかの取得
    return int(input()) def onem(): #Nとかの取得
    return int(input()) onem n,k = m() m() n a = l() l() a aaa = nibu(a,k,right) nibu(a,k,right) aaa def cou(x,le):
    co = 0
    for i in range(len(x)):
        if le != 0:
            co += -(-x[i]//le) - 1
    return co def cou(x,le):
    co = 0
    for i in range(len(x)):
        if le != 0:
            co += -(-x[i]//le) - 1
    return co cou input = sys.stdin.readline sys.stdin.readline input def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a s def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans pow_k k = m() m() k right = 10**9 10**9 right def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False In def max2(x): #他のときもどうように作成可能
    return max(map(max,x)) def max2(x): #他のときもどうように作成可能
    return max(map(max,x)) max2 Max = sys.maxsize sys.maxsize Max left = 0 0 left def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x)) def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x)) jo
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans


def nibu(x,n,r):
    ll = 1
    rr = r
    while True:
        mid = (ll+rr)//2
        
        if rr == mid:
            return ll
        
        if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1

def cou(x,le):
    co = 0
    for i in range(len(x)):
        if le != 0:
            co += -(-x[i]//le) - 1
    return co


n,k = m()

a = l()

left = 0

right = 10**9


aaa = nibu(a,k,right)
print(aaa)
