#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=int(a);i<int(b);i++)
typedef long long ll;
typedef pair<ll,ll> P;



int main(){
    ll n,k;cin>>n>>k;
    ll a[200020];
    rep(i,0,n)cin>>a[i];
    ll r=1e9,l=0;
    while(r>l+1){
        ll mid=(l+r)/2;
        ll cn=0;
        rep(i,0,n){
            cn+=(a[i]-1)/mid;
        }
        if(k>=cn)r=mid;
        else l=mid;
    }
    cout<<r<<endl;
}

    







