func_code_string: #include <bits/stdc++.h>   double A[200000], B[200000];   int i, j, n, m;   double p;   int main() {     scanf( %d , &n);     for (i = 1; i <= n; i++) {       scanf( %lf , &p);       B[i] = p * (B[i - 1] + 1);       A[i] = (A[i - 1] + 2 * B[i - 1] + 1) * p + (1 - p) * A[i - 1];     }     printf( %.9lf n , A[n]);   }   