#include <bits/stdc++.h>
using namespace std;
void read_file(bool outToFile = true) {}
int n;
const int nMax = 100000 + 2 + 9;
double P[nMax];
double dp[nMax];
double ans;
int main() {
  read_file();
  while (scanf("%d", &n) != EOF) {
    ans = 0;
    for (int i = 1; i <= n; i++) scanf("%lf", &P[i]), ans += 1 * P[i];
    dp[1] = 0;
    for (int i = 2; i <= n; i++) {
      dp[i] = 2 * P[i] * P[i - 1] + P[i] * dp[i - 1];
      ans += dp[i];
    }
    printf("%.9lf\n", ans);
  }
}
