#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int res = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    res = (res << 3) + (res << 1) + ch - '0';
    ch = getchar();
  }
  return res * f;
}
void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 | '0');
}
const int N = 100005;
int n;
double p[N], x[N], ans;
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &p[i]);
  }
  for (int i = 1; i <= n; i++) x[i] = (x[i - 1] + 1) * p[i];
  for (int i = 1; i <= n; i++) ans += (x[i - 1] * 2 + 1) * p[i];
  printf("%.10lf", ans);
  return 0;
}
