#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; assert(1 <= n && n <= 100000); ll s0 = 0, s1 = 0, v; for(int i = 0; i < n; i++){ cin >> v; assert(1 <= v); s0 += v; s1 += v * v; } assert(s0 <= 1000000000); cout << fixed << setprecision(15) << (s0 + 1 - (double)(s1) / (s0) - 1e-6) << '\n'; }