#include <bits/stdc++.h>
int z, m, n;
double p[300000], ans, x, y;
int main() {
  int i, j, k;
  scanf("%d", &n);
  x = 0;
  ans = 0;
  for (i = 1; i <= n; i++) {
    scanf("%lf", &p[i]);
    ans += p[i];
  }
  x = 0;
  for (i = n - 1; i >= 1; i--) {
    x = (x + 2 * p[i + 1]) * p[i];
    ans += x;
  }
  printf("%.9lf", ans);
  getchar();
  getchar();
}
