#include <iostream>using namespace std;
int main(int argc, char** argv) { unsigned int n,d[1000],o=0,i; //cout<<"請輸入天數"<<endl; cin>>n; //cout<<"請個別輸入每天買的個數"<<endl; for(i=1;n>=i;i++){ cin>>d[i]; o+=d[i]*i; } cout<<o<<endl; return 0;}