#include <bits/stdc++.h>
using namespace std;
int read() {
int s = 0, w = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-') w = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
s = s * 10 + c - '0';
c = getchar();
}
return s * w;
}
#define fro(n) for(int i=1;i<=n;i++)
const int maxn = 1e8;
double a[maxn];
int n,k;
bool check(double x){
int sum = 0;
for(int i = 1;i <= n;i++){
sum += a[i] / x;
}
if(sum >= k) return true;
else return false;
}
int main() {
n = read(),k = read();
fro(n){
a[i] = read();
}
double l = 0,r = 1e9;
while(r - l > 1e-6){
double mid = (l + r) / 2;
if(check(mid)) l = mid;
else r = mid;
}
printf("%lf\n",l);
return 0;
}