#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int n,k;
cin>>n>>k;
int arr[10000];
for(int i=0;i<n;i++){
cin>>arr[i];
}
long long s = 1;
long long e = 1;
for(int i=1;i<=31;i++){
e*=2;
}
e-=1;
long long mid;
while(s<e){
mid = (s+e+1)/2;
int cnt = 0;
for(int i=0;i<n;i++){
cnt+=(arr[i]/mid);
}
if(cnt<k){
e = mid-1;
}else{
s = mid;
}
}
cout<<s;
}