func_code_string: #include <bits/stdc++.h>   using namespace std;   long long int powmod(long long int a, int b, int n) {     long long int rm = 1;     while (b) {       if (b % 2) {         rm = (rm * a) % n;       }       a = (a * a) % n;       b /= 2;     }     return rm;   }   int main() {     int n;     long long int a[110];     cin >> n;     for (int i = (int)1; i <= (int)n; i++) cin >> a[i];     long long int cost = 0;     for (long long int i = 1; i <= n; ++i) {       cost = cost + (a[i] - 1) * i + 1;     }     cout << cost << endl;     return 0;   }   