input()
*l,=map(int,input().split())
print((pow(sum(l),2)-sum([pow(x,2) for x in l]))//2) input() input *l,=map(int,input().split()) *l l map(int,input().split()) map int input().split() ().split () input split pow(x,2) for x in l for x in l x l for x in l pow(x,2) pow x 2 print((pow(sum(l),2)-sum([pow(x,2) for x in l]))//2) print (pow(sum(l),2)-sum([pow(x,2) for x in l]))//2 pow(sum(l),2)-sum([pow(x,2) for x in l]) pow(sum(l),2) pow sum(l) sum l 2 sum([pow(x,2) for x in l]) sum [pow(x,2) for x in l] 2
input()
*l,=map(int,input().split())
print((pow(sum(l),2)-sum([pow(x,2) for x in l]))//2)