N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N):
  for j in range(i+1,N):
    temp = A[i]*A[j]
    ans += temp
print(ans) N = int(input()) N int(input()) int input() input A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans = 0 ans 0 for i in range(N):
  for j in range(i+1,N):
    temp = A[i]*A[j]
    ans += temp i range(N) range N for j in range(i+1,N):
    temp = A[i]*A[j]
    ans += temp j range(i+1,N) range i+1 i 1 N temp = A[i]*A[j] temp A[i]*A[j] A[i] A i A[j] A j ans += temp ans temp print(ans) print ans ans = 0 0 ans ans += temp temp ans temp = A[i]*A[j] A[i]*A[j] temp N = int(input()) int(input()) N A = list(map(int,input().split())) list(map(int,input().split())) A
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N):
  for j in range(i+1,N):
    temp = A[i]*A[j]
    ans += temp
print(ans)