#include <bits/stdc++.h>
using namespace std;
double dp[100000 + 5];
double dp1[100000 + 5];
int main() {
  int n;
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    double p;
    cin >> p;
    dp[i] = (dp[i - 1] + 1) * p;
    dp1[i] = dp1[i - 1] + p * (2 * dp[i - 1] + 1);
  }
  cout << fixed << setprecision(10) << dp1[n];
  return 0;
}
