#include <bits/stdc++.h>
using namespace std;
const int N = 101010;
double p[N];
int n;
int main(void) {
  scanf("%d", &n);
  double ans, pr = ans = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lf", p + i);
    ans += p[i];
  }
  for (int i = 1; i < n; i++) {
    pr = (pr + p[i - 1]) * p[i];
    ans += 2 * pr;
  }
  printf("%.15lf\n", ans);
  return 0;
}
