#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int n, m;
double p[111111], dp[111111], pp[111111];
int main() {
  int i, j, k, x, y, z, ca = 1;
  double re = 0;
  scanf("%d", &(n));
  for (int i = 0; i < (int)(n); ++i) scanf("%lf", p + i), re += p[i];
  pp[0] = 0;
  for (int i = (int)(1); i <= (int)(n - 1); ++i)
    pp[i] = pp[i - 1] * p[i] + p[i - 1] * p[i];
  for (int i = (int)(1); i <= (int)(n - 1); ++i) dp[i] = dp[i - 1] + pp[i];
  re += 2.0 * dp[n - 1];
  printf("%.12lf\n", re);
  return 0;
}
