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

p = list(itertools.permutations(d,2))


n = 0

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

p = list(itertools.permutations(d,2))


n = 0

for i in range(len(p)):
    n = n + (p[i][0] * p[i][1])
    
A = int(n/2)
print(A)
