#include <bits/stdc++.h>
using namespace std;
inline void read(int& n) {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  n = x * f;
}
int outputarray[20];
inline void write(int k) {
  int num = 0;
  if (k < 0) putchar('-'), k = -k;
  do {
    outputarray[++num] = k % 10, k /= 10;
  } while (k);
  while (num) putchar(outputarray[num--] + '0');
  puts("");
}
const int N = 1e5 + 5;
int n;
double a[N], b[N], f[N];
int main() {
  read(n);
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &a[i]);
    b[i] = (b[i - 1] + 1) * a[i];
    f[i] = f[i - 1] + (2 * b[i - 1] + 1) * a[i];
  }
  printf("%.10lf\n", f[n]);
  return 0;
}
