n = int(input())
l = list(map(int, input().split()))

ans = 0
for i in range(n):
  for ii in range(i+1, n):
    ans += l[i]*l[ii]

print(ans) 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 ans = 0 ans 0 for i in range(n):
  for ii in range(i+1, n):
    ans += l[i]*l[ii] i range(n) range n for ii in range(i+1, n):
    ans += l[i]*l[ii] ii range(i+1, n) range i+1 i 1 n ans += l[i]*l[ii] ans l[i]*l[ii] l[i] l i l[ii] l ii print(ans) print ans n = int(input()) int(input()) n ans += l[i]*l[ii] l[i]*l[ii] ans ans = 0 0 ans l = list(map(int, input().split())) list(map(int, input().split())) l
n = int(input())
l = list(map(int, input().split()))

ans = 0
for i in range(n):
  for ii in range(i+1, n):
    ans += l[i]*l[ii]

print(ans)