#include <bits/stdc++.h>
using namespace std;
namespace zzc {
const int maxn = 1e5 + 5;
double p[maxn], x2[maxn], x1[maxn];
int n;
void work() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &p[i]);
  }
  for (int i = 1; i <= n; i++) {
    x1[i] = (x1[i - 1] + 1) * p[i];
    x2[i] = x2[i - 1] + (2 * x1[i - 1] + 1) * p[i];
  }
  printf("%.6lf", x2[n]);
}
}  // namespace zzc
int main() {
  zzc::work();
  return 0;
}
