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