N,K=map(int,input().split())
*A,=map(int,input().split())

def C(x):
  return sum([(A[i]-.5)//x for i in range(N)]) <= K
  
def binary_search2(func, n_min, n_max):
    left,right=n_min,n_max
    while right-left>1:
        middle = (left+right)//2
        y_middle = func(middle)
        if y_middle: right=middle
        else: left=middle

    return right
  
print(binary_search2(C, 0, max(A)+1)) 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 def C(x):
  return sum([(A[i]-.5)//x for i in range(N)]) <= K
   C (A[i]-.5)//x for i in range(N) for i in range(N) i range(N) range N for i in range(N) (A[i]-.5)//x A[i]-.5 A[i] A i .5 x return sum([(A[i]-.5)//x for i in range(N)]) <= K sum([(A[i]-.5)//x for i in range(N)]) <= K sum([(A[i]-.5)//x for i in range(N)]) sum [(A[i]-.5)//x for i in range(N)] K x x def binary_search2(func, n_min, n_max):
    left,right=n_min,n_max
    while right-left>1:
        middle = (left+right)//2
        y_middle = func(middle)
        if y_middle: right=middle
        else: left=middle

    return right
   binary_search2 left,right=n_min,n_max left n_min right n_max while right-left>1:
        middle = (left+right)//2
        y_middle = func(middle)
        if y_middle: right=middle
        else: left=middle

     right-left>1 right-left right left 1 middle = (left+right)//2 middle (left+right)//2 left+right left right 2 y_middle = func(middle) y_middle func(middle) func middle if y_middle: right=middle
        else: left=middle

     y_middle return right right func func n_min n_min n_max n_max print(binary_search2(C, 0, max(A)+1)) print binary_search2(C, 0, max(A)+1) binary_search2 C 0 max(A)+1 max(A) max A 1 def C(x):
  return sum([(A[i]-.5)//x for i in range(N)]) <= K
   def C(x):
  return sum([(A[i]-.5)//x for i in range(N)]) <= K
   C N,K=map(int,input().split()) map(int,input().split()) N def binary_search2(func, n_min, n_max):
    left,right=n_min,n_max
    while right-left>1:
        middle = (left+right)//2
        y_middle = func(middle)
        if y_middle: right=middle
        else: left=middle

    return right
   def binary_search2(func, n_min, n_max):
    left,right=n_min,n_max
    while right-left>1:
        middle = (left+right)//2
        y_middle = func(middle)
        if y_middle: right=middle
        else: left=middle

    return right
   binary_search2 K=map(int,input().split()) map(int,input().split()) K
N,K=map(int,input().split())
*A,=map(int,input().split())

def C(x):
  return sum([(A[i]-.5)//x for i in range(N)]) <= K
  
def binary_search2(func, n_min, n_max):
    left,right=n_min,n_max
    while right-left>1:
        middle = (left+right)//2
        y_middle = func(middle)
        if y_middle: right=middle
        else: left=middle

    return right
  
print(binary_search2(C, 0, max(A)+1))