#include <bits/stdc++.h>
using namespace std;
double p[123456], s[123456];
int main() {
  int n;
  double res = 0;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> p[i];
    s[i] = (s[i - 1] + 1) * p[i];
    res += s[i] * 2 - p[i];
  }
  printf("%.10lf\n", res);
  return 0;
}
