#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  double a[n];
  double ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ans += a[i];
  }
  double dp[n];
  dp[0] = 0;
  for (int i = 1; i < n; i++) {
    dp[i] = (dp[i - 1] + a[i - 1]) * a[i];
    ans += 2 * dp[i];
  }
  printf("%.7f\n", ans);
}
