#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; assert(1 <= n && n <= 100000); long long 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)) << '\n'; }