func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     double x = 0, ans = 0, p[100005] = {0};     int n;     cin >> n;     for (int i = 1; i <= n; i++) cin >> p[i];     for (int i = 1; i <= n; i++) {       x = x * p[i] + p[i];       ans += 2 * x;       ans -= p[i];     }     cout << fixed << setprecision(10);     cout << ans;     return 0;   }   