#include <bits/stdc++.h>
int const N = 100100;
double p[N];
double sum[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%lf", p + i);
  }
  double ans = 0;
  for (int i = 0; i < n; ++i) {
    ans += p[i];
  }
  sum[0] = 0;
  for (int i = 1; i < n; ++i) {
    sum[i] = p[i] * (p[i - 1] + sum[i - 1]);
    ans += 2 * sum[i];
  }
  printf("%.15f\n", ans);
}
