console.log((args=>{
  const [[N,K],A] = args.trim().split`\n`.map(r=>r.split` `.map(v=>0|v));
  let ng = 0, ok = 1e9;
  while ( ok - ng > 1 ) {
    const m = (ok+ng)>>>1;
    let k = 0;
    for ( let i = 0; i < N; i++ ) {
      k += Math.floor((A[i]-1)/m);
    }
    if ( k > K ) ng = m;
    else ok = m;
  }
  return ok;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
