#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  ld total = 0;
  vector<ld> p(n);
  for (auto& v : p) {
    cin >> v;
    total += v;
  }
  ld dp = 0;
  for (int i = 1; i < n; ++i) {
    dp = (dp + p[i - 1]) * p[i];
    total += 2 * dp;
  }
  cout << fixed << setprecision(16) << total << '\n';
  return 0;
}
