#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 10;
double P[MAX], dp[MAX];
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    for (int i = 1; i <= n; i++) {
      scanf("%lf", &P[i]);
    }
    dp[0] = 0;
    for (int i = 1; i <= n; i++) {
      dp[i] = (dp[i - 1] + P[i - 1]) * P[i];
    }
    double res = 0;
    for (int i = 1; i <= n; i++) {
      res += dp[i] * 2 + P[i];
    }
    printf("%.13lf\n", res);
  }
  return 0;
}
