import math

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


min_A = 0
max_A = 10**10

while( max_A - min_A > 1):
  now = (min_A + max_A) // 2
  temp = 0
  for i in A:
    if i > now:
      temp += (i // now)
  if temp > K:
    min_A = now
  else:
    max_A = now

print(int(min_A) + 1) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K A = list(map(float, input().split())) A list(map(float, input().split())) list map(float, input().split()) map float input().split() ().split () input split min_A = 0 min_A 0 max_A = 10**10 max_A 10**10 10 10 while( max_A - min_A > 1):
  now = (min_A + max_A) // 2
  temp = 0
  for i in A:
    if i > now:
      temp += (i // now)
  if temp > K:
    min_A = now
  else:
    max_A = now max_A - min_A > 1 max_A - min_A max_A min_A 1 now = (min_A + max_A) // 2 now (min_A + max_A) // 2 min_A + max_A min_A max_A 2 temp = 0 temp 0 for i in A:
    if i > now:
      temp += (i // now)
   i A if i > now:
      temp += (i // now)
   i > now i now temp += (i // now) temp i // now i now if temp > K:
    min_A = now
  else:
    max_A = now temp > K temp K min_A = now min_A now max_A = now max_A now print(int(min_A) + 1) print int(min_A) + 1 int(min_A) int min_A 1 A = list(map(float, input().split())) list(map(float, input().split())) A max_A = 10**10 10**10 max_A min_A = now now min_A K = map(int, input().split()) map(int, input().split()) K max_A = now now max_A now = (min_A + max_A) // 2 (min_A + max_A) // 2 now temp += (i // now) i // now temp min_A = 0 0 min_A N, K = map(int, input().split()) map(int, input().split()) N temp = 0 0 temp
import math

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


min_A = 0
max_A = 10**10

while( max_A - min_A > 1):
  now = (min_A + max_A) // 2
  temp = 0
  for i in A:
    if i > now:
      temp += (i // now)
  if temp > K:
    min_A = now
  else:
    max_A = now

print(int(min_A) + 1)