# ABC143
# B Tkoyaki Festival 2019
n = int(input())
D = list(map(int, input().split()))
ct = 0
for i in range(n):
    for j in range(n):
        if i != j:
            if i < j:
                ct += D[i] * D[j]
print(ct) 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 ct = 0 ct 0 for i in range(n):
    for j in range(n):
        if i != j:
            if i < j:
                ct += D[i] * D[j] i range(n) range n for j in range(n):
        if i != j:
            if i < j:
                ct += D[i] * D[j] j range(n) range n if i != j:
            if i < j:
                ct += D[i] * D[j] i != j i j if i < j:
                ct += D[i] * D[j] i < j i j ct += D[i] * D[j] ct D[i] * D[j] D[i] D i D[j] D j print(ct) print ct ct += D[i] * D[j] D[i] * D[j] ct ct = 0 0 ct D = list(map(int, input().split())) list(map(int, input().split())) D n = int(input()) int(input()) n
# ABC143
# B Tkoyaki Festival 2019
n = int(input())
D = list(map(int, input().split()))
ct = 0
for i in range(n):
    for j in range(n):
        if i != j:
            if i < j:
                ct += D[i] * D[j]
print(ct)
