N=int(input())
List = list(map(int, input().split()))
wa = 0
for i in range(N):
  for j in range(N):
    if j == i:
      pass
    else:
      wa += List[i]*List[j]
wa = wa //2
print(wa) N=int(input()) N int(input()) int input() input List = list(map(int, input().split())) List list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split wa = 0 wa 0 for i in range(N):
  for j in range(N):
    if j == i:
      pass
    else:
      wa += List[i]*List[j] i range(N) range N for j in range(N):
    if j == i:
      pass
    else:
      wa += List[i]*List[j] j range(N) range N if j == i:
      pass
    else:
      wa += List[i]*List[j] j == i j i wa += List[i]*List[j] wa List[i]*List[j] List[i] List i List[j] List j wa = wa //2 wa wa //2 wa 2 print(wa) print wa N=int(input()) int(input()) N wa += List[i]*List[j] List[i]*List[j] wa List = list(map(int, input().split())) list(map(int, input().split())) List wa = 0 0 wa wa = wa //2 wa //2 wa
N=int(input())
List = list(map(int, input().split()))
wa = 0
for i in range(N):
  for j in range(N):
    if j == i:
      pass
    else:
      wa += List[i]*List[j]
wa = wa //2
print(wa)