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