#include <bits/stdc++.h>
using namespace std;
double p[100005], f[100005], res;
int n;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> p[i];
  f[1] = res = p[1];
  for (int i = 2; i <= n; i++) {
    f[i] = p[i] + (f[i - 1] - p[i - 1]) * p[i] + p[i - 1] * p[i] * 2;
    res += f[i];
  }
  cout << fixed << setprecision(9) << res << endl;
  return 0;
}
