#include <bits/stdc++.h>
using namespace std;
int N;
double p[100010], pre[100010], prob[100010], sol;
int main() {
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> p[i];
  for (int i = 1; i <= N; i++)
    pre[i] = pre[i - 1] * p[i] + (1.0 - p[i - 1]) * p[i];
  for (int i = 1; i <= N; i++) {
    prob[i] =
        prob[i - 1] * p[i] + 2.0 * pre[i - 1] * p[i] + (1.0 - p[i - 1]) * p[i];
    sol = sol + prob[i];
  }
  cout << setprecision(6) << fixed << sol << "\n";
  return 0;
}
