#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main () {
  int N;
  ll K;
  cin >> N >> K;
  vector<ll>A(N);
  for (int i = 0; i < N; i ++) cin >> A[i];
  ll mi = 1;
  ll ma = 1e9;
  while (mi != ma) {
    ll mu = (mi + ma) / 2;
    ll kj = 0;
    for (int i = 0; i < N; i ++) {
      kj += ((A[i] - 1) / mu);
    }
    if (kj <= K) ma = mu;
    else mi = mu + 1;
  }
  cout << mi << endl;
}
