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