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