#include <bits/stdc++.h>
using namespace std;

int main(){
	int n, k;
	cin>>n>>k;
	vector<int> v(n);
	int mn = 0, mx = 0;
	for (int i = 0; i<n; i++){
		cin>>v[i];
		if (v[i]>mx)
			mx = v[i]; 
	}
	mx+=10;
	int M, cnt;
	while(mn+1<mx){
		cnt = 0;
		M = (mn+mx)/2;
		for(auto u : v)
			cnt+=(u-1)/M;
		if(cnt<=k) mx = M;
		else mn = M;
	}
	cout<<mx;
}
