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

def check(x):
  c = 0
  for i in range(n):
    c += a[i]//x
    if a[i]%x == 0:
      c -= 1
  if c <= k:
    return True
  else:
    return False

mx = max(a)
mn = 0
ans = [mx]
while mn <= mx:
  m = (mx+mn)//2
  if m == 0:
    if check(1):
      ans.append(1)
    break
  if check(m):
    mx = m - 1
    ans.append(m)
  else:
    mn = m + 1
print (min(ans)) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def check(x):
  c = 0
  for i in range(n):
    c += a[i]//x
    if a[i]%x == 0:
      c -= 1
  if c <= k:
    return True
  else:
    return False check c = 0 c 0 for i in range(n):
    c += a[i]//x
    if a[i]%x == 0:
      c -= 1
   i range(n) range n c += a[i]//x c a[i]//x a[i] a i x if a[i]%x == 0:
      c -= 1
   a[i]%x == 0 a[i]%x a[i] a i x 0 c -= 1 c 1 if c <= k:
    return True
  else:
    return False c <= k c k return True True return False False x x mx = max(a) mx max(a) max a mn = 0 mn 0 ans = [mx] ans [mx] mx while mn <= mx:
  m = (mx+mn)//2
  if m == 0:
    if check(1):
      ans.append(1)
    break
  if check(m):
    mx = m - 1
    ans.append(m)
  else:
    mn = m + 1 mn <= mx mn mx m = (mx+mn)//2 m (mx+mn)//2 mx+mn mx mn 2 if m == 0:
    if check(1):
      ans.append(1)
    break
   m == 0 m 0 if check(1):
      ans.append(1)
     check(1) check 1 ans.append(1) ans.append ans append 1 break if check(m):
    mx = m - 1
    ans.append(m)
  else:
    mn = m + 1 check(m) check m mx = m - 1 mx m - 1 m 1 ans.append(m) ans.append ans append m mn = m + 1 mn m + 1 m 1 print (min(ans)) print min(ans) min ans mx = m - 1 m - 1 mx a = list(map(int, input().split())) list(map(int, input().split())) a def check(x):
  c = 0
  for i in range(n):
    c += a[i]//x
    if a[i]%x == 0:
      c -= 1
  if c <= k:
    return True
  else:
    return False def check(x):
  c = 0
  for i in range(n):
    c += a[i]//x
    if a[i]%x == 0:
      c -= 1
  if c <= k:
    return True
  else:
    return False check ans = [mx] [mx] ans mn = 0 0 mn mx = max(a) max(a) mx n, k = map(int, input().split()) map(int, input().split()) n mn = m + 1 m + 1 mn k = map(int, input().split()) map(int, input().split()) k m = (mx+mn)//2 (mx+mn)//2 m
n, k = map(int, input().split())
a = list(map(int, input().split()))

def check(x):
  c = 0
  for i in range(n):
    c += a[i]//x
    if a[i]%x == 0:
      c -= 1
  if c <= k:
    return True
  else:
    return False

mx = max(a)
mn = 0
ans = [mx]
while mn <= mx:
  m = (mx+mn)//2
  if m == 0:
    if check(1):
      ans.append(1)
    break
  if check(m):
    mx = m - 1
    ans.append(m)
  else:
    mn = m + 1
print (min(ans))
