n = int(input())
D = list(map(int, input().split()))
pf = 0
for i in range(n - 1):
    for j in range(i + 1, n):
        pf += D[i] * D[j]
print(pf) 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 pf = 0 pf 0 for i in range(n - 1):
    for j in range(i + 1, n):
        pf += D[i] * D[j] i range(n - 1) range n - 1 n 1 for j in range(i + 1, n):
        pf += D[i] * D[j] j range(i + 1, n) range i + 1 i 1 n pf += D[i] * D[j] pf D[i] * D[j] D[i] D i D[j] D j print(pf) print pf D = list(map(int, input().split())) list(map(int, input().split())) D n = int(input()) int(input()) n pf = 0 0 pf pf += D[i] * D[j] D[i] * D[j] pf
n = int(input())
D = list(map(int, input().split()))
pf = 0
for i in range(n - 1):
    for j in range(i + 1, n):
        pf += D[i] * D[j]
print(pf)