n = int(input())
d = list(map(int,input().split()))
z = 0

for x in range(n - 1):
    for y in range(x + 1,n):
        z += d[x] * d[y]
        

print(z) n = int(input()) n int(input()) int input() input d = list(map(int,input().split())) d list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split z = 0 z 0 for x in range(n - 1):
    for y in range(x + 1,n):
        z += d[x] * d[y]
         x range(n - 1) range n - 1 n 1 for y in range(x + 1,n):
        z += d[x] * d[y]
         y range(x + 1,n) range x + 1 x 1 n z += d[x] * d[y] z d[x] * d[y] d[x] d x d[y] d y print(z) print z z += d[x] * d[y] d[x] * d[y] z d = list(map(int,input().split())) list(map(int,input().split())) d n = int(input()) int(input()) n z = 0 0 z
n = int(input())
d = list(map(int,input().split()))
z = 0

for x in range(n - 1):
    for y in range(x + 1,n):
        z += d[x] * d[y]
        

print(z)