#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector x(n); for(auto &v : x) cin >> v; ll s = accumulate(x.begin(), x.end(), 0ll); ll s1 = accumulate(x.begin(), x.end(), 0ll, [&](ll lhs, ll rhs){return lhs + rhs * (s - rhs);}); cout << fixed << setprecision(15) << (1 + double(s1) / s) << '\n'; }