N = int(input())
d = list(map(int, input().split()))

import itertools

D = list(range(1, len(d)+1))
p = itertools.permutations(d, 2)

ans = 0
for v in itertools.permutations(D, 2):
    ans = d[v[0]-1] *d[v[1]-1] + ans

print(int(ans/2)) 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 import itertools itertools D = list(range(1, len(d)+1)) D list(range(1, len(d)+1)) list range(1, len(d)+1) range 1 len(d)+1 len(d) len d 1 p = itertools.permutations(d, 2) p itertools.permutations(d, 2) itertools.permutations itertools permutations d 2 ans = 0 ans 0 for v in itertools.permutations(D, 2):
    ans = d[v[0]-1] *d[v[1]-1] + ans v itertools.permutations(D, 2) itertools.permutations itertools permutations D 2 ans = d[v[0]-1] *d[v[1]-1] + ans ans d[v[0]-1] *d[v[1]-1] + ans d[v[0]-1] *d[v[1]-1] d[v[0]-1] d v[0]-1 v[0] v 0 1 d[v[1]-1] d v[1]-1 v[1] v 1 1 ans print(int(ans/2)) print int(ans/2) int ans/2 ans 2 d = list(map(int, input().split())) list(map(int, input().split())) d D = list(range(1, len(d)+1)) list(range(1, len(d)+1)) D ans = 0 0 ans N = int(input()) int(input()) N p = itertools.permutations(d, 2) itertools.permutations(d, 2) p ans = d[v[0]-1] *d[v[1]-1] + ans d[v[0]-1] *d[v[1]-1] + ans ans
N = int(input())
d = list(map(int, input().split()))

import itertools

D = list(range(1, len(d)+1))
p = itertools.permutations(d, 2)

ans = 0
for v in itertools.permutations(D, 2):
    ans = d[v[0]-1] *d[v[1]-1] + ans

print(int(ans/2))