#include <bits/stdc++.h>
using namespace std;
const int N = 200000;
int n;
double tmp;
int main() {
  scanf("%d", &n);
  double now = 0, ans = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &tmp);
    now = now * tmp;
    ans = ans + now + now + tmp;
    now = now + tmp;
  }
  printf("%.6lf\n", ans);
}
