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

