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

