#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
double p[N], a[N], f[N];
int read() {
  int x = 0, f = 1;
  char ch;
  while (!isdigit(ch = getchar())) (ch == '-') && (f = -f);
  for (x = ch ^ 48; isdigit(ch = getchar());
       x = (x << 3) + (x << 1) + (ch ^ 48))
    ;
  return x * f;
}
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) scanf("%lf", &p[i]);
  for (int i = 1; i <= n; ++i) {
    a[i] = (a[i - 1] + 1) * p[i];
    f[i] = f[i - 1] * (1 - p[i]) + (f[i - 1] + 2 * a[i - 1] + 1) * p[i];
  }
  printf("%.10f\n", f[n]);
  return 0;
}
