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