func_code_string: #include <bits/stdc++.h>   using namespace std;   static const int INF = 500000000;   template <class T>   void debug(T a, T b) {     for (; a != b; ++a) cerr << *a <<    ;     cerr << endl;   }   int n;   double p[100005];   double get(int i) {     if (i == -1) return 0;     return p[i];   }   int main() {     scanf( %d , &n);     for (int i = 0; i < n; ++i) scanf( %lf , &p[i]);     double res = 0, prev = 0;     for (int i = 0; i < n; ++i) {       prev = prev * p[i] + p[i] * get(i - 1) * 2;       prev += p[i] * (1 - get(i - 1));       res += prev;     }     printf( %.10f n , res);     return 0;   }   