#include <bits/stdc++.h>
using namespace std;
double p[100005], e1[100005], e2[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) scanf("%lf", p + i);
  for (register int i = 1; i <= n; ++i) {
    e1[i] = (e1[i - 1] + 1) * p[i];
    e2[i] = e2[i - 1] + (e1[i - 1] + e1[i - 1] + 1) * p[i];
  }
  printf("%.15lf", e2[n]);
  return 0;
}
