#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long double ans = 0, P = 0, p;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p;
    ans += p;
    P *= p;
    ans += 2 * P;
    P += p;
  }
  cout << setprecision(9) << ans;
  return 0;
}
