#include using namespace std; using ll = long long; int main(){ int n; cin >> n; ll s = 0, s1 = 0, v; while(n--){ cin >> v; s1 += s * v; s += v; } cout << fixed << setprecision(15) << (1 + double(s1 << 1) / s) << '\n'; }