#include <bits/stdc++.h>
using namespace std;
int main() {
  double pr = 0, one = 0, temp;
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  double go = 0, last = 0;
  for (int i = 0; i < n; ++i) {
    cin >> temp;
    one += temp;
    go = (go + last) * temp;
    last = temp;
    pr += go;
  }
  cout << fixed << setprecision(9) << pr * 2 + one;
  return 0;
}
