n=int(input())
li = list(map(int,input().split()))
a=0
for i in range(n):
  for j in range(n):
    a += li[i]*li[j]
b=0
for i in range(n):
    b+= li[i]*li[i]
print((a-b)//2)
 n=int(input()) n int(input()) int input() input li = list(map(int,input().split())) li list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a=0 a 0 for i in range(n):
  for j in range(n):
    a += li[i]*li[j] i range(n) range n for j in range(n):
    a += li[i]*li[j] j range(n) range n a += li[i]*li[j] a li[i]*li[j] li[i] li i li[j] li j b=0 b 0 for i in range(n):
    b+= li[i]*li[i] i range(n) range n b+= li[i]*li[i] b li[i]*li[i] li[i] li i li[i] li i print((a-b)//2) print (a-b)//2 a-b a b 2 b+= li[i]*li[i] li[i]*li[i] b a += li[i]*li[j] li[i]*li[j] a li = list(map(int,input().split())) list(map(int,input().split())) li n=int(input()) int(input()) n a=0 0 a b=0 0 b
n=int(input())
li = list(map(int,input().split()))
a=0
for i in range(n):
  for j in range(n):
    a += li[i]*li[j]
b=0
for i in range(n):
    b+= li[i]*li[i]
print((a-b)//2)

