from itertools import combinations
n=int(input())
d=list(map(int,input().split()))
c = list(combinations(d,2))
ans = 0
for i,j in c:
    ans += (i*j)
print(ans) from itertools import combinations 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 c = list(combinations(d,2)) c list(combinations(d,2)) list combinations(d,2) combinations d 2 ans = 0 ans 0 for i,j in c:
    ans += (i*j) i j c ans += (i*j) ans i*j i j print(ans) print ans n=int(input()) int(input()) n d=list(map(int,input().split())) list(map(int,input().split())) d c = list(combinations(d,2)) list(combinations(d,2)) c ans += (i*j) i*j ans ans = 0 0 ans
from itertools import combinations
n=int(input())
d=list(map(int,input().split()))
c = list(combinations(d,2))
ans = 0
for i,j in c:
    ans += (i*j)
print(ans)