#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int n;
double p[MAXN];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%lf", p + i);
  double res = 0, x = 0;
  for (int i = 1; i <= n; ++i) {
    res += (2 * x + 1) * p[i];
    x = (1 + x) * p[i];
  }
  cout.precision(20);
  cout << fixed << showpoint;
  cout << res << endl;
  return 0;
}
