#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100050;
int n;
double P[MAXN], ans;
int main() {
  while (scanf("%d", &n) >= 1) {
    ans = 0.0;
    for (int i = (0); i < (int)(n); i++) {
      scanf("%lf", &P[i]);
      ans += P[i];
    }
    double dp, tof;
    dp = 0;
    tof = 0;
    for (int i = (1); i < (int)(n); i++) {
      tof = (tof + P[i - 1]) * P[i];
      dp = dp + tof;
    }
    printf("%.10f\n", 2 * dp + ans);
  }
  return 0;
}
