N = int(input())
D = [int(n) for n in input().split()]
ans = 0
for i in range(N-1):
    for j in range(i+1, N):
       ans += D[i] * D[j]
print(ans) N = int(input()) N int(input()) int input() input int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n D = [int(n) for n in input().split()] D [int(n) for n in input().split()] ans = 0 ans 0 for i in range(N-1):
    for j in range(i+1, N):
       ans += D[i] * D[j] i range(N-1) range N-1 N 1 for j in range(i+1, N):
       ans += D[i] * D[j] j range(i+1, N) range i+1 i 1 N ans += D[i] * D[j] ans D[i] * D[j] D[i] D i D[j] D j print(ans) print ans ans += D[i] * D[j] D[i] * D[j] ans ans = 0 0 ans N = int(input()) int(input()) N D = [int(n) for n in input().split()] [int(n) for n in input().split()] D
N = int(input())
D = [int(n) for n in input().split()]
ans = 0
for i in range(N-1):
    for j in range(i+1, N):
       ans += D[i] * D[j]
print(ans)
