n = int(input())
num = list(map(int,input().split()))
a = 0
for i in range(n):
    for j in range(i + 1,n):
        a += num[i] * num[j]

print(a) n = int(input()) n int(input()) int input() input num = list(map(int,input().split())) num list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a = 0 a 0 for i in range(n):
    for j in range(i + 1,n):
        a += num[i] * num[j] i range(n) range n for j in range(i + 1,n):
        a += num[i] * num[j] j range(i + 1,n) range i + 1 i 1 n a += num[i] * num[j] a num[i] * num[j] num[i] num i num[j] num j print(a) print a n = int(input()) int(input()) n num = list(map(int,input().split())) list(map(int,input().split())) num a = 0 0 a a += num[i] * num[j] num[i] * num[j] a
n = int(input())
num = list(map(int,input().split()))
a = 0
for i in range(n):
    for j in range(i + 1,n):
        a += num[i] * num[j]

print(a)