func_code_string: #include <bits/stdc++.h>   using namespace std;   double p[100010];   double E[100010];   int main() {     int n;     cin >> n;     p[0] = 0;     E[0] = 0;     double ans = 0;     for (int i = 1; i <= n; ++i) {       cin >> p[i];       E[i] = (1.0 - p[i - 1]) * p[i] + 2 * p[i] * p[i - 1] + p[i] * E[i - 1];       ans += E[i];     }     cout << setprecision(10) << ans << endl;   }   