#include <bits/stdc++.h>
using namespace std;
int n;
long double p, _p, x, fp;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i, _p = p) {
    cin >> p;
    x = (x + _p * 2) * p;
    fp += x + p;
  }
  cout << fixed << setprecision(6) << fp << endl;
  return 0;
}
