#include <bits/stdc++.h>
using namespace std;
double dp[100005], p[100005];
int main() {
  double sum;
  int i, n;
  dp[0] = 0;
  while (~scanf("%d", &n)) {
    for (i = 1; i <= n; i++) scanf("%lf", p + i);
    sum = 0;
    for (i = 1; i <= n; i++) {
      dp[i] = (dp[i - 1] + p[i - 1]) * p[i];
      sum += 2 * dp[i] + p[i];
    }
    printf("%.8f\n", sum);
  }
  return 0;
}
