#include <bits/stdc++.h>
using namespace std;
class classcomp {
 public:
  bool operator()(const int& l, const int& r) const { return l < r; }
};
int main() {
  int n;
  scanf("%d", &n);
  double p[100010];
  double ans = 0;
  int i;
  for (i = 0; i < n; i++) {
    scanf("%lf", &p[i]);
    ans += p[i];
  }
  double dp[100010];
  dp[0] = 0;
  for (i = 1; i < n; i++) {
    dp[i] = (p[i - 1] + dp[i - 1]) * p[i];
    ans += 2 * dp[i];
  }
  printf("%.7lf\n", ans);
  return 0;
}
