#include <bits/stdc++.h>
using namespace std;

int a[222222];
int main() {
    int n, k;
    cin >> n >> k;
    for(int i = 0; i < n; i++)
        cin >> a[i];
    int l = 0, r = 1e9;
    while(l + 1 < r) {
        auto m = (l + r) / 2;
        long x = 0;
        for(int j = 0; j < n; j++)
            x += (a[j] - 1) / m;
        (x > k ? l : r) = m;
    }
    cout << r << endl;
    return 0;
}
