#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int n;
double p, len, f;
int main() {
  ios ::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p;
    f = f + (2 * len + 1) * p;
    len = (len + 1) * p;
  }
  cout << fixed << setprecision(15);
  cout << f << endl;
  return 0;
}
