import sys
import math

input = sys.stdin.readline

def can(arr, m, K):
  need = 0
  for x in arr:
    if x > m:
      need += int(x // m)
  return need <= K

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

lo = 1
hi = int(1e9) + 1

while (lo < hi):
  m = int((lo + hi) // 2)
  if (can(arr, m, K)):
    hi = m
  else:
    lo = m + 1
print(lo) import sys sys import math math input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def can(arr, m, K):
  need = 0
  for x in arr:
    if x > m:
      need += int(x // m)
  return need <= K can need = 0 need 0 for x in arr:
    if x > m:
      need += int(x // m)
   x arr if x > m:
      need += int(x // m)
   x > m x m need += int(x // m) need int(x // m) int x // m x m return need <= K need <= K need K arr arr m m K K N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K arr = list(map(int, input().split())) arr list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split lo = 1 lo 1 hi = int(1e9) + 1 hi int(1e9) + 1 int(1e9) int 1e9 1 while (lo < hi):
  m = int((lo + hi) // 2)
  if (can(arr, m, K)):
    hi = m
  else:
    lo = m + 1 lo < hi lo hi m = int((lo + hi) // 2) m int((lo + hi) // 2) int (lo + hi) // 2 lo + hi lo hi 2 if (can(arr, m, K)):
    hi = m
  else:
    lo = m + 1 can(arr, m, K) can arr m K hi = m hi m lo = m + 1 lo m + 1 m 1 print(lo) print lo lo = m + 1 m + 1 lo arr = list(map(int, input().split())) list(map(int, input().split())) arr hi = m m hi lo = 1 1 lo m = int((lo + hi) // 2) int((lo + hi) // 2) m N, K = map(int, input().split()) map(int, input().split()) N hi = int(1e9) + 1 int(1e9) + 1 hi K = map(int, input().split()) map(int, input().split()) K input = sys.stdin.readline sys.stdin.readline input def can(arr, m, K):
  need = 0
  for x in arr:
    if x > m:
      need += int(x // m)
  return need <= K def can(arr, m, K):
  need = 0
  for x in arr:
    if x > m:
      need += int(x // m)
  return need <= K can
import sys
import math

input = sys.stdin.readline

def can(arr, m, K):
  need = 0
  for x in arr:
    if x > m:
      need += int(x // m)
  return need <= K

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

lo = 1
hi = int(1e9) + 1

while (lo < hi):
  m = int((lo + hi) // 2)
  if (can(arr, m, K)):
    hi = m
  else:
    lo = m + 1
print(lo)
