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