n = int(input())
d = list(map(int, input().split()))
s = 0

for i in range(n):
    for j in range(n):
        if i != j:
            s += d[i]*d[j]

s //= 2

print(s) 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 s = 0 s 0 for i in range(n):
    for j in range(n):
        if i != j:
            s += d[i]*d[j] i range(n) range n for j in range(n):
        if i != j:
            s += d[i]*d[j] j range(n) range n if i != j:
            s += d[i]*d[j] i != j i j s += d[i]*d[j] s d[i]*d[j] d[i] d i d[j] d j s //= 2 s 2 print(s) print s d = list(map(int, input().split())) list(map(int, input().split())) d s += d[i]*d[j] d[i]*d[j] s s = 0 0 s n = int(input()) int(input()) n s //= 2 2 s
n = int(input())
d = list(map(int, input().split()))
s = 0

for i in range(n):
    for j in range(n):
        if i != j:
            s += d[i]*d[j]

s //= 2

print(s)
