# ABC 143 B

N = int(input())
D =[int(d) for d in input().split()]
from itertools import combinations
ans =0
for i in list(combinations(D,2)):
    ans+=i[0]* i[1]
print(ans) N = int(input()) N int(input()) int input() input int(d) for d in input().split() for d in input().split() d input().split() ().split () input split for d in input().split() int(d) int d D =[int(d) for d in input().split()] D [int(d) for d in input().split()] from itertools import combinations ans =0 ans 0 for i in list(combinations(D,2)):
    ans+=i[0]* i[1] i list(combinations(D,2)) list combinations(D,2) combinations D 2 ans+=i[0]* i[1] ans i[0]* i[1] i[0] i 0 i[1] i 1 print(ans) print ans ans+=i[0]* i[1] i[0]* i[1] ans D =[int(d) for d in input().split()] [int(d) for d in input().split()] D N = int(input()) int(input()) N ans =0 0 ans
# ABC 143 B

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