#include <bits/stdc++.h>
using namespace std;
const long long N = 100011;
const long long INF = 5e16;
long long n;
double p, f[N], O[N], T[N];
namespace IO {
inline char gc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return (p1 == p2) &&
                 (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long read() {
  long long x = 0;
  bool f = 0;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) f ^= (ch == '-');
  for (; isdigit(ch); ch = getchar()) x = x * 10 + (ch ^ 48);
  return f ? -x : x;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 | 48);
}
inline void wrn(long long x) {
  write(x);
  putchar(' ');
}
inline void wln(long long x) {
  write(x);
  putchar('\n');
}
inline void wlnn(long long x, long long y) { wrn(x), wln(y); }
}  // namespace IO
using IO::read;
using IO::wln;
double Ans = 0;
int main() {
  n = read();
  for (register int i = (1); i <= (n); ++i) {
    cin >> p;
    O[i] = (O[i - 1] + 1) * p;
    Ans += (2 * O[i - 1] + 1) * p;
  }
  return printf("%.12lf\n", Ans), 0;
}
