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