#include<iostream>
#include<cstdio>
using namespace std;
int main() {
int n;
cin >> n;
long double val, sum = 0.0;
for (int i = 1; i <= n; i++) {
cin >> val;
sum += val * (n - i + 1) * i;
}
printf("%.2lf", sum);
return 0;
}
#include<iostream>
#include<cstdio>
using namespace std;
int main() {
int n;
cin >> n;
long double val, sum = 0.0;
for (int i = 1; i <= n; i++) {
cin >> val;
sum += val * (n - i + 1) * i;
}
printf("%.2lf", sum);
return 0;
}