#include <iostream> using namespace std; int main() { int num_days, total_money = 0; cin >> num_days; for (int i = 1; i <= num_days; i++) { int buns; cin >> buns; total_money += buns * i; } cout << total_money; return 0; }