N = int(input())
A=[int(x) for x in input().split(' ')]

heal = 0

for i in range(N-1):
  for j in range(i+1,N):
    heal += A[i]*A[j]

print(heal) N = int(input()) N int(input()) int input() input int(x) for x in input().split(' ') for x in input().split(' ') x input().split(' ') ().split () input split ' ' for x in input().split(' ') int(x) int x A=[int(x) for x in input().split(' ')] A [int(x) for x in input().split(' ')] heal = 0 heal 0 for i in range(N-1):
  for j in range(i+1,N):
    heal += A[i]*A[j] i range(N-1) range N-1 N 1 for j in range(i+1,N):
    heal += A[i]*A[j] j range(i+1,N) range i+1 i 1 N heal += A[i]*A[j] heal A[i]*A[j] A[i] A i A[j] A j print(heal) print heal heal = 0 0 heal N = int(input()) int(input()) N A=[int(x) for x in input().split(' ')] [int(x) for x in input().split(' ')] A heal += A[i]*A[j] A[i]*A[j] heal
N = int(input())
A=[int(x) for x in input().split(' ')]

heal = 0

for i in range(N-1):
  for j in range(i+1,N):
    heal += A[i]*A[j]

print(heal)