N = int(input())
L = list(map(int, input().split()))
sum = 0

for x in range(N):
  for y in range(x+1, N):
    sum += L[x]*L[y]
print(sum) N = int(input()) N int(input()) int input() input L = list(map(int, input().split())) L list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split sum = 0 sum 0 for x in range(N):
  for y in range(x+1, N):
    sum += L[x]*L[y] x range(N) range N for y in range(x+1, N):
    sum += L[x]*L[y] y range(x+1, N) range x+1 x 1 N sum += L[x]*L[y] sum L[x]*L[y] L[x] L x L[y] L y print(sum) print sum sum = 0 0 sum N = int(input()) int(input()) N L = list(map(int, input().split())) list(map(int, input().split())) L sum += L[x]*L[y] L[x]*L[y] sum
N = int(input())
L = list(map(int, input().split()))
sum = 0

for x in range(N):
  for y in range(x+1, N):
    sum += L[x]*L[y]
print(sum)