#include <bits/stdc++.h>
int convert(std::string str, int& index, int& count) {
  int n = 0;
  while (index < str.size() && isdigit(str.at(index)))
    n = n * 10 + str.at(index++) - 48;
  int number = n * count++;
  return number;
}
int main() {
  std::string str;
  std::getline(std::cin, str);
  int number = 0;
  for (int j = 0, i = 0; j < str.size(); ++j) {
    number += convert(str, j, i);
  }
  std::cout << number << std::endl;
}
