#include<iostream>
#include<vector>
#include<cctype>
#include<map>
#include<set>
#include<sstream>
#include<string>
#include<cstdio>
#include<algorithm>
#define inf 0x3f3f3f3f
const int maxn=10005;
typedef long long ll;
using namespace std;
int main() {
int n;cin>>n;
double ans=0;
for(int i=1;i<=n;i++){
double x;cin>>x;
ans+=x*i*(n+1-i);
}
printf("%.2f
",ans);
return 0;
}