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