N,K=[int(s) for s in input().split()]
maruta=[int(s) for s in input().split()]

def possible(x):
  cut=0
  for e in maruta:
    if e%x==0:
      cut+=(e//x-1)
    else:
      cut+=e//x
  if cut<=K:
    return True
  else:
    return False

a=1
b=max(maruta)
while b-a>1:
  c=(a+b)//2
  if possible(c):
    b=c
  else:
    a=c

if possible(1):
  print(1)
else:
  print(b) int(s) for s in input().split() for s in input().split() s input().split() ().split () input split for s in input().split() int(s) int s N,K=[int(s) for s in input().split()] N [int(s) for s in input().split()] K int(s) for s in input().split() for s in input().split() s input().split() ().split () input split for s in input().split() int(s) int s maruta=[int(s) for s in input().split()] maruta [int(s) for s in input().split()] def possible(x):
  cut=0
  for e in maruta:
    if e%x==0:
      cut+=(e//x-1)
    else:
      cut+=e//x
  if cut<=K:
    return True
  else:
    return False possible cut=0 cut 0 for e in maruta:
    if e%x==0:
      cut+=(e//x-1)
    else:
      cut+=e//x
   e maruta if e%x==0:
      cut+=(e//x-1)
    else:
      cut+=e//x
   e%x==0 e%x e x 0 cut+=(e//x-1) cut e//x-1 e//x e x 1 cut+=e//x cut e//x e x if cut<=K:
    return True
  else:
    return False cut<=K cut K return True True return False False x x a=1 a 1 b=max(maruta) b max(maruta) max maruta while b-a>1:
  c=(a+b)//2
  if possible(c):
    b=c
  else:
    a=c b-a>1 b-a b a 1 c=(a+b)//2 c (a+b)//2 a+b a b 2 if possible(c):
    b=c
  else:
    a=c possible(c) possible c b=c b c a=c a c if possible(1):
  print(1)
else:
  print(b) possible(1) possible 1 print(1) print 1 print(b) print b a=c c a K=[int(s) for s in input().split()] [int(s) for s in input().split()] K b=c c b a=1 1 a maruta=[int(s) for s in input().split()] [int(s) for s in input().split()] maruta def possible(x):
  cut=0
  for e in maruta:
    if e%x==0:
      cut+=(e//x-1)
    else:
      cut+=e//x
  if cut<=K:
    return True
  else:
    return False def possible(x):
  cut=0
  for e in maruta:
    if e%x==0:
      cut+=(e//x-1)
    else:
      cut+=e//x
  if cut<=K:
    return True
  else:
    return False possible b=max(maruta) max(maruta) b N,K=[int(s) for s in input().split()] [int(s) for s in input().split()] N c=(a+b)//2 (a+b)//2 c
N,K=[int(s) for s in input().split()]
maruta=[int(s) for s in input().split()]

def possible(x):
  cut=0
  for e in maruta:
    if e%x==0:
      cut+=(e//x-1)
    else:
      cut+=e//x
  if cut<=K:
    return True
  else:
    return False

a=1
b=max(maruta)
while b-a>1:
  c=(a+b)//2
  if possible(c):
    b=c
  else:
    a=c

if possible(1):
  print(1)
else:
  print(b)
