n,k = list(map(int,input().split()))
f = list(map(int,input().split()))

s = (10**9) // 2
step = s
best= 999999999999
import math

for j in range(50):
  c = 0
  arr = list(f)

  for i in range(n):
    if arr[i] > s:
      v = 0
      if arr[i] % s != 0:
        c += arr[i] // s
        v += arr[i] // s
      else:
        c += arr[i] // s
        v += arr[i] // s
        c -= 1
        v -= 1
      cor = 0
      if arr[i] % (v+1) != 0:
        cor = 1
      arr[i] = arr[i]//(v+1) + cor
    
  step = step//2
  step = max(1, step)
 
  if c<=k:
    best = min(best,max(arr))
   # print(s,best)
    s -= step
  else:
    s += step
    
  if s==0:
    s=1
      
print(best) 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 f = list(map(int,input().split())) f list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split s = (10**9) // 2 s (10**9) // 2 10**9 10 9 2 step = s step s best= 999999999999 best 999999999999 import math math for j in range(50):
  c = 0
  arr = list(f)

  for i in range(n):
    if arr[i] > s:
      v = 0
      if arr[i] % s != 0:
        c += arr[i] // s
        v += arr[i] // s
      else:
        c += arr[i] // s
        v += arr[i] // s
        c -= 1
        v -= 1
      cor = 0
      if arr[i] % (v+1) != 0:
        cor = 1
      arr[i] = arr[i]//(v+1) + cor
    
  step = step//2
  step = max(1, step)
 
  if c<=k:
    best = min(best,max(arr))
   # print(s,best)
    s -= step
  else:
    s += step
    
  if s==0:
    s=1
       j range(50) range 50 c = 0 c 0 arr = list(f) arr list(f) list f for i in range(n):
    if arr[i] > s:
      v = 0
      if arr[i] % s != 0:
        c += arr[i] // s
        v += arr[i] // s
      else:
        c += arr[i] // s
        v += arr[i] // s
        c -= 1
        v -= 1
      cor = 0
      if arr[i] % (v+1) != 0:
        cor = 1
      arr[i] = arr[i]//(v+1) + cor
    
   i range(n) range n if arr[i] > s:
      v = 0
      if arr[i] % s != 0:
        c += arr[i] // s
        v += arr[i] // s
      else:
        c += arr[i] // s
        v += arr[i] // s
        c -= 1
        v -= 1
      cor = 0
      if arr[i] % (v+1) != 0:
        cor = 1
      arr[i] = arr[i]//(v+1) + cor
    
   arr[i] > s arr[i] arr i s v = 0 v 0 if arr[i] % s != 0:
        c += arr[i] // s
        v += arr[i] // s
      else:
        c += arr[i] // s
        v += arr[i] // s
        c -= 1
        v -= 1
       arr[i] % s != 0 arr[i] % s arr[i] arr i s 0 c += arr[i] // s c arr[i] // s arr[i] arr i s v += arr[i] // s v arr[i] // s arr[i] arr i s c += arr[i] // s c arr[i] // s arr[i] arr i s v += arr[i] // s v arr[i] // s arr[i] arr i s c -= 1 c 1 v -= 1 v 1 cor = 0 cor 0 if arr[i] % (v+1) != 0:
        cor = 1
       arr[i] % (v+1) != 0 arr[i] % (v+1) arr[i] arr i v+1 v 1 0 cor = 1 cor 1 arr[i] = arr[i]//(v+1) + cor arr[i] arr i arr[i]//(v+1) + cor arr[i]//(v+1) arr[i] arr i v+1 v 1 cor step = step//2 step step//2 step 2 step = max(1, step) step max(1, step) max 1 step if c<=k:
    best = min(best,max(arr))
   # print(s,best)
    s -= step
  else:
    s += step
    
   c<=k c k best = min(best,max(arr)) best min(best,max(arr)) min best max(arr) max arr s -= step s step s += step s step if s==0:
    s=1
       s==0 s 0 s=1 s 1 print(best) print best s = (10**9) // 2 (10**9) // 2 s v += arr[i] // s arr[i] // s v best = min(best,max(arr)) min(best,max(arr)) best c -= 1 1 c step = step//2 step//2 step k = list(map(int,input().split())) list(map(int,input().split())) k s -= step step s c = 0 0 c v = 0 0 v cor = 0 0 cor v -= 1 1 v c += arr[i] // s arr[i] // s c s += step step s n,k = list(map(int,input().split())) list(map(int,input().split())) n f = list(map(int,input().split())) list(map(int,input().split())) f c += arr[i] // s arr[i] // s c cor = 1 1 cor s=1 1 s v += arr[i] // s arr[i] // s v step = max(1, step) max(1, step) step arr = list(f) list(f) arr step = s s step best= 999999999999 999999999999 best
n,k = list(map(int,input().split()))
f = list(map(int,input().split()))

s = (10**9) // 2
step = s
best= 999999999999
import math

for j in range(50):
  c = 0
  arr = list(f)

  for i in range(n):
    if arr[i] > s:
      v = 0
      if arr[i] % s != 0:
        c += arr[i] // s
        v += arr[i] // s
      else:
        c += arr[i] // s
        v += arr[i] // s
        c -= 1
        v -= 1
      cor = 0
      if arr[i] % (v+1) != 0:
        cor = 1
      arr[i] = arr[i]//(v+1) + cor
    
  step = step//2
  step = max(1, step)
 
  if c<=k:
    best = min(best,max(arr))
   # print(s,best)
    s -= step
  else:
    s += step
    
  if s==0:
    s=1
      
print(best)