#include<algorithm>
#include<cstdio>
#include<iostream>
#include<cmath>
using namespace std;
int n,k;
int a[500000];
bool judge(int x){
int temp=0;
for(int i=1;i<=n;i++){
temp+=a[i]/x;
}
return temp>=k;
}
int main(){
cin>>n>>k;
int l=0,r=1000000000,mid;
long long tot;
for(int i=1;i<=n;i++){
cin>>a[i];
tot+=a[i];
}
if(k>tot){
cout<<"0";
}
else if(k<=tot){
while(l<=r){
mid=(l+r)/2;
if(mid==0) break;
if(judge(mid)) l=mid+1;//r=mid-1;
else r=mid-1;//l=mid+1;
}
cout<<r;
}
return 0;
}