#include <bits/stdc++.h>
using namespace std;
int n;
double t, p, ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> t;
    p *= t;
    ans += (2 * p) + t;
    p += t;
  }
  printf("%.15f", ans);
}
