ll N,S,i;{rd(N);REP(N)S+=rd()*++i*N--;wt(S);}