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