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