#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int main() {
  int n;
  double m[maxn + 5];
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%lf", &m[i]);
  double last = 0, ans = 0;
  for (int i = 1; i <= n; ++i) {
    ans += m[i] * ((last + 1) * (last + 1) - last * last);
    last = m[i] * (last + 1);
  }
  printf("%.8f\n", ans);
  return 0;
}
