#include <bits/stdc++.h>
int n, m;
double a[100006];
double b[100006];
double c[100006];
double p[100006];
void input() {
  int i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%lf", &p[i]);
  }
}
void process() {
  int i, j;
  for (i = 1; i <= n; i++) {
    a[i] = p[i - 1] * (a[i - 1] + 1);
  }
  b[n - 1] = p[n - 1];
  for (i = n - 2; i >= 0; i--) {
    b[i] = p[i] * (b[i + 1] + 1);
  }
  for (i = 0; i < n; i++) {
    c[i] = (a[i] + b[i + 1] + 1) * p[i];
  }
  double s = 0;
  for (i = 0; i < n; i++) {
    s += c[i];
  }
  printf("%.8lf\n", s);
}
int main() {
  input();
  process();
  return 0;
}
