#include <bits/stdc++.h>
using namespace std;
const int Inf = 0x3f3f3f3f;
const int NMAX = 100005;
double e[NMAX], es[NMAX], p[NMAX];
int main() {
  long long n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> p[i];
  for (int i = 1; i <= n; ++i) {
    e[i] = e[i - 1] + 2 * es[i - 1] * p[i] + p[i];
    es[i] = (es[i - 1] + 1) * p[i];
  }
  cout << setprecision(6) << fixed << e[n] << "\n";
  return 0;
}
