#include <bits/stdc++.h>
int n;
double p[100001], dizi[100001], f[100001];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lf", &p[i]);
  for (int i = 1; i <= n; i++) {
    dizi[i] = dizi[i - 1] + (2 * f[i - 1] + 1) * p[i];
    f[i] = (f[i - 1] + 1) * p[i];
  }
  printf("%.20lf\n", dizi[n]);
}
