#include <bits/stdc++.h>
using namespace std;
const int mod = 1073741824;
const int maxn = 1000010;
double p[100005];
double dp1[100005];
double dp2[100005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
  }
  dp1[0] = 0;
  dp2[0] = 0;
  double ans = 0;
  for (int i = 1; i <= n; i++) {
    dp1[i] = dp1[i - 1] * p[i] + p[i];
    dp2[i] = dp1[i] - p[i];
    ans += dp1[i] + dp2[i];
  }
  printf("%.7f\n", ans);
}
