#include <bits/stdc++.h>
const long double pi = acos(-1.0);
const long double eps = 1e-9;
using namespace std;
const int N = 1e5 + 10;
int n;
long double dp[N];
void solve() {
  cin >> n;
  long double ans = 0;
  for (int i = 1; i <= n; i++) {
    long double p;
    cin >> p;
    ans += dp[i - 1] * p * 2 + p;
    dp[i] = dp[i - 1] * p + p;
  }
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(NULL), cin.tie(0), cout.tie(0);
  cout.setf(ios::fixed), cout.precision(10);
  int step;
  step = 1;
  for (int i = 1; i <= step; i++) {
    solve();
  }
}
