n=int(input())
d=[int(x) for x in input().split()]
ans=0
import itertools
# (1,2,3),(1,2,4),---,(7,8,9)
for seq in itertools.combinations(range(len(d)),2):
    ans+=d[seq[0]]*d[seq[1]]
print(ans) n=int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x d=[int(x) for x in input().split()] d [int(x) for x in input().split()] ans=0 ans 0 import itertools itertools for seq in itertools.combinations(range(len(d)),2):
    ans+=d[seq[0]]*d[seq[1]] seq itertools.combinations(range(len(d)),2) itertools.combinations itertools combinations range(len(d)) range len(d) len d 2 ans+=d[seq[0]]*d[seq[1]] ans d[seq[0]]*d[seq[1]] d[seq[0]] d seq[0] seq 0 d[seq[1]] d seq[1] seq 1 print(ans) print ans ans+=d[seq[0]]*d[seq[1]] d[seq[0]]*d[seq[1]] ans n=int(input()) int(input()) n ans=0 0 ans d=[int(x) for x in input().split()] [int(x) for x in input().split()] d
n=int(input())
d=[int(x) for x in input().split()]
ans=0
import itertools
# (1,2,3),(1,2,4),---,(7,8,9)
for seq in itertools.combinations(range(len(d)),2):
    ans+=d[seq[0]]*d[seq[1]]
print(ans)