#include #include #include #include #define rep(i, a, b) for (ll i = a; i < (b); ++i) #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using vi = vector; struct frac { ll num, den; frac(ll num, ll den) : num(num), den(den) { if (den < 0) { this->num = -num; this->den = -den; } } strong_ordering operator<=>(const frac &rhs) const { return (__int128_t) num * rhs.den <=> (__int128_t) den * rhs.num; } }; int main() { ios::sync_with_stdio(false); cin.tie(0); ll n, f_max; cin >> n >> f_max; vi x(n); rep(i, 0, n) cin >> x[i]; priority_queue, greater<>> pq; rep(i, 0, n) pq.emplace(frac(1000, x[i])); frac best(transform_reduce(all(x), 0, plus<>(), [&](ll xi) { return (xi * f_max + 999) / 1000; }), f_max); ll sum = n; while (!pq.empty()) { auto f = pq.top(); pq.pop(); if (f > frac(f_max, 1)) break; pq.emplace(frac(f.num + 1000, f.den)); best = min(best, frac(f.den * sum++, f.num)); } cout << setprecision(10) << fixed << (double) best.num / best.den << '\n'; return 0; }