import std.stdio;
import std.algorithm;
import std.math;
import std.container;


struct Pair {
	double length;
	long count;
}

void main() {
	long n, k;
	readf("%s %s\n", &n, &k);

	auto pairs = new Pair[n];
	long s;
	foreach (ref p;pairs) {
		long t;
		readf(" %s", &t);
		p.length = cast(double)t;
		s += t;
		p.count = 1;
	}

	auto h = heapify!"a.length < b.length"(pairs);

	while (k > 0) {
		auto pair = h.front;
		h.removeFront();

		auto c = ceil(pair.length / s * k);
		pair.length /= (c + 1);
		pair.count *= (c + 1);
		k -= c;
		
		h.insert(pair);
	}

	writeln(cast(long)ceil(h.front.length));
}
