# include <iostream>
using namespace std;
int a[100005], n, k;
bool check(int x)
{
long long cnt = 0;
for (int i = 1; i <= n; i++)
cnt += a[i] / x;
return cnt >= k;
}
int main()
{
int n, k, maxx = -1;
cin >> n >> k;
for (int i = 1; i <= n; i++)
{
cin >> a[i];
maxx = max(maxx, a[i]);
}
if (!check(1))
cout << 0 << endl;
else
{
int small = 1, big = maxx + 1, med = (big + 1) / 2;
while (big - 1 > small)
{
if (!check(med))
big = med;
else
small = med;
med = (small + big) / 2;
}
cout << small << endl;
}
return 0;
}