#include <bits/stdc++.h>
using namespace std;
int n;
double ans, tmp, x;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%lf", &x), tmp *= x, ans += 2 * tmp + x, tmp += x;
  printf("%.10lf\n", ans);
  return 0;
}
