func_code_string: #include <bits/stdc++.h>   using namespace std;   double dp[100002];   int main() {     double res = 0, prob = 0;     int n;     cin >> n;     dp[0] = 0;     for (int i = 0; i < n; i++) {       double p;       cin >> p;       dp[i] = dp[i - 1] * p;       res = res + p + dp[i] * 2.0;       dp[i] += p;     }     printf( %.7lf n , res);     return 0;   }   