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