#include <bits/stdc++.h>
using namespace std;
double dp[111111];
int main() {
  int n;
  int i, j, k;
  double pp, xx;
  while (cin >> n) {
    xx = pp = dp[0] = 0.0;
    for (i = 1; i <= n; i++)
      cin >> pp, dp[i] = dp[i - 1] * pp + pp, xx += 2.0 * (dp[i] - pp) + pp;
    printf("%.10lf\n", xx);
  }
  return 0;
}
