#include <bits/stdc++.h>
using namespace std;
inline void chkmax(int &a, int b) { a = a > b ? a : b; }
inline void chkmin(int &a, int b) { a = a < b ? a : b; }
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -f;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  return x * f;
}
inline void write(int x) {
  char c[33] = {0}, tot = 0;
  if (x == 0) {
    putchar('0');
    return;
  }
  while (x) {
    c[++tot] = x % 10 + '0';
    x /= 10;
  }
  while (tot) {
    putchar(c[tot--]);
  }
  return;
}
const int maxn = 1e5 + 5;
int s, t, n, m;
double p[maxn], a[maxn], b[maxn];
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];
    b[i] = b[i - 1] + (2 * a[i - 1] + 1) * p[i];
  }
  printf("%.15lf", b[n]);
  return 0;
}
