import itertools
N = int(input())
ds = list(map(int, input().split()))
DC = list(itertools.combinations(ds, 2))
L = 0
for i in DC:
	L += i[0]*i[1]
print(L) import itertools itertools N = int(input()) N int(input()) int input() input ds = list(map(int, input().split())) ds list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split DC = list(itertools.combinations(ds, 2)) DC list(itertools.combinations(ds, 2)) list itertools.combinations(ds, 2) itertools.combinations itertools combinations ds 2 L = 0 L 0 for i in DC:
	L += i[0]*i[1] i DC L += i[0]*i[1] L i[0]*i[1] i[0] i 0 i[1] i 1 print(L) print L DC = list(itertools.combinations(ds, 2)) list(itertools.combinations(ds, 2)) DC L = 0 0 L ds = list(map(int, input().split())) list(map(int, input().split())) ds L += i[0]*i[1] i[0]*i[1] L N = int(input()) int(input()) N
import itertools
N = int(input())
ds = list(map(int, input().split()))
DC = list(itertools.combinations(ds, 2))
L = 0
for i in DC:
	L += i[0]*i[1]
print(L)