#include <bits/stdc++.h>
using namespace std;
stack<int> s;
int carrots = 2, calories = 0, chocolate = 100, flour = 1, egg = 1;
int main() {
  s.push(calories);
  scanf("%d", &carrots);
  while (carrots) {
    scanf("%d", &chocolate);
    s.push(chocolate);
    s.top() *= flour;
    chocolate = s.top();
    s.pop();
    s.top() += chocolate;
    s.push(flour);
    s.top() += egg;
    flour = s.top();
    s.pop();
    carrots--;
  }
  printf("%d", s.top());
}
