#include <bits/stdc++.h>
using namespace std;
double E[100010];
double R[100010];
double p[100010];
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    for (int i = 1; i <= n; ++i) {
      scanf("%lf", &p[i]);
    }
    E[1] = p[1];
    R[1] = p[1];
    for (int i = 2; i <= n; ++i) {
      E[i] = E[i - 1] + p[i] + 2 * p[i] * R[i - 1];
      R[i] = (R[i - 1] + 1) * p[i];
    }
    printf("%.10f\n", E[n]);
  }
  return 0;
}
