#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  scanf("%d", &n);
  double ret = 0, sumPair = 0;
  for (int i = 0; i < n; i++) {
    double p;
    scanf("%lf", &p);
    ret += p;
    ret += 2 * sumPair * p;
    sumPair *= p;
    sumPair += p;
  }
  printf("%.18lf\n", ret);
}
