#include <bits/stdc++.h>
const int N = 1001000;
int n;
double a[N], f[N];
int main() {
  scanf("%d", &n);
  double s(1), f(0), z(0), x;
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &x);
    f = f * x;
    z += 2 * f + x;
    f += x;
  }
  printf("%.15lf", z);
  return 0;
}
