N = int(input()) A = list(map(int, input().split())) X = N Y = 1 ans = 0 for i in range(N): ans += A[i] * X * Y X -= 1 Y += 1 print(ans)