n = int(input())
oi = list(map(int,input().split()))

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

total = 0
for i in range(n-1):
    for j in range(i+1,n):
        total += oi[i]*oi[j]
        
print(total)