n = int(input())
xlist = list(map(int,input().split()))
sum = 0
for i in range(n):
  for j in range(i+1,n):
    sum+=xlist[i]*xlist[j]
print(sum) n = int(input()) n int(input()) int input() input xlist = list(map(int,input().split())) xlist list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split sum = 0 sum 0 for i in range(n):
  for j in range(i+1,n):
    sum+=xlist[i]*xlist[j] i range(n) range n for j in range(i+1,n):
    sum+=xlist[i]*xlist[j] j range(i+1,n) range i+1 i 1 n sum+=xlist[i]*xlist[j] sum xlist[i]*xlist[j] xlist[i] xlist i xlist[j] xlist j print(sum) print sum sum+=xlist[i]*xlist[j] xlist[i]*xlist[j] sum n = int(input()) int(input()) n xlist = list(map(int,input().split())) list(map(int,input().split())) xlist sum = 0 0 sum
n = int(input())
xlist = list(map(int,input().split()))
sum = 0
for i in range(n):
  for j in range(i+1,n):
    sum+=xlist[i]*xlist[j]
print(sum)