#include<bits/stdc++.h>
using namespace std;
int n,k,a[100000005],maxLog;
bool check(int chopLog){
int sections=0;
for(int i=1;i<=n;i++) sections+=a[i]/chopLog;
if(sections>=k) return true;
else return false;
}
int main(){
cin>>n>>k;
for(int i=1;i<=n;i++){
cin>>a[i];
maxLog=max(maxLog,a[i]);
}
int l=1,r=maxLog,mid=(l+r)/2;
while(l<=r){
mid=(l+r)/2;
if(check(mid)==true){
l=mid+1;
}else{
r=mid-1;
}
}
cout<<r;
return 0;
}