Main(require("fs").readFileSync("/dev/stdin", "utf8"));

function Main(input) {
  input = input.split("\n");
  const [n, k] = input[0].split(" ").map((a) => parseInt(a, 10));
  const a = input[1].split(" ").map((a) => parseInt(a, 10));
  let l = 0, r = 1e9;
  while (r-l > 1) {
    const x = Math.ceil((l+r)/2);
    let now = 0;
    for(let i=0; i<n; i++) {
      now += Math.ceil((a[i])/x) -1;
    }
    if (now <= k) {
      r = x;
    } else {
      l = x;
    }
  }
  console.log(r);
  return;
}