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