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