#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n;
double g[N], p[N], ans = 0;
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) scanf("%lf", &p[i]);
  for (register int i = 1; i <= n; ++i) {
    g[i] = (g[i - 1] + 1) * p[i];
    ans += p[i] * (2 * g[i - 1] + 1);
  }
  printf("%lf\n", ans);
  return 0;
}
