#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
int n;
int main() {
  cin >> n;
  double sum = 0, add = 0, pi;
  for (int i = 0; i != n; ++i) {
    cin >> pi;
    sum += (2 * add * pi + pi);
    add = (add + 1) * pi;
  }
  cout << std::fixed << std::setprecision(10) << sum << endl;
  return 0;
}
