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