a=int(input())
b=0
c=list(map(int,input().split()))
for i in range(a):
  for k in range(a):
    b=b+c[i]*c[k]
for u in range(a):
  b=b-c[u]*c[u]
print(int(b/2)) a=int(input()) a int(input()) int input() input b=0 b 0 c=list(map(int,input().split())) c list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(a):
  for k in range(a):
    b=b+c[i]*c[k] i range(a) range a for k in range(a):
    b=b+c[i]*c[k] k range(a) range a b=b+c[i]*c[k] b b+c[i]*c[k] b c[i]*c[k] c[i] c i c[k] c k for u in range(a):
  b=b-c[u]*c[u] u range(a) range a b=b-c[u]*c[u] b b-c[u]*c[u] b c[u]*c[u] c[u] c u c[u] c u print(int(b/2)) print int(b/2) int b/2 b 2 b=b+c[i]*c[k] b+c[i]*c[k] b b=0 0 b a=int(input()) int(input()) a c=list(map(int,input().split())) list(map(int,input().split())) c b=b-c[u]*c[u] b-c[u]*c[u] b
a=int(input())
b=0
c=list(map(int,input().split()))
for i in range(a):
  for k in range(a):
    b=b+c[i]*c[k]
for u in range(a):
  b=b-c[u]*c[u]
print(int(b/2))