import itertools
n = int(input())
d = list(map(int,input().split()))
a = (list(itertools.permutations(d,2)))
b = []
for i in range(len(a)):
    b.append(a[i][0]*a[i][1])
print(sum(b)//2) import itertools itertools n = int(input()) n int(input()) int input() input d = list(map(int,input().split())) d list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a = (list(itertools.permutations(d,2))) a list(itertools.permutations(d,2)) list itertools.permutations(d,2) itertools.permutations itertools permutations d 2 b = [] b [] for i in range(len(a)):
    b.append(a[i][0]*a[i][1]) i range(len(a)) range len(a) len a b.append(a[i][0]*a[i][1]) b.append b append a[i][0]*a[i][1] a[i][0] [i] a i 0 a[i][1] [i] a i 1 print(sum(b)//2) print sum(b)//2 sum(b) sum b 2 n = int(input()) int(input()) n d = list(map(int,input().split())) list(map(int,input().split())) d b = [] [] b a = (list(itertools.permutations(d,2))) list(itertools.permutations(d,2)) a
import itertools
n = int(input())
d = list(map(int,input().split()))
a = (list(itertools.permutations(d,2)))
b = []
for i in range(len(a)):
    b.append(a[i][0]*a[i][1])
print(sum(b)//2)