#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int main()
{
	int n, k;
	cin >> n >> k;
	vector<int> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}

	int l = 0, r = 1000000001;
	while (l + 1 < r) {
		int c = (l + r) / 2;
		int cut = 0;
		for (int i = 0; i < n; i++) {
			cut += (a[i] + c - 1) / c - 1;
		}

		if (cut > k) {
			l = c;
		} else {
			r = c;
		}
	}
	cout << l + 1<< endl;

    return 0;
}