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