#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int N = 100500;
int n;
double p[N];
double f[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  double ans = 0.0;
  for (int i = 1; i <= n; i++) cin >> p[i];
  for (int i = 1; i <= n; i++) {
    ans += (2.0 * f[i - 1] * p[i]);
    ans += p[i];
    f[i] = (f[i - 1] * p[i]) + p[i];
  }
  f[n] = ans;
  cout << fixed << setprecision(20) << f[n] << endl;
  return 0;
}
