n=int(input())
d=list(map(int,input().split()))
x=0
for i in range(n):
    for j in range(n):
        if i==j:
            continue
        else:
            x+=d[i]*d[j]
            
print(x//2) n=int(input()) n int(input()) int input() input d=list(map(int,input().split())) d list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split x=0 x 0 for i in range(n):
    for j in range(n):
        if i==j:
            continue
        else:
            x+=d[i]*d[j]
             i range(n) range n for j in range(n):
        if i==j:
            continue
        else:
            x+=d[i]*d[j]
             j range(n) range n if i==j:
            continue
        else:
            x+=d[i]*d[j]
             i==j i j continue x+=d[i]*d[j] x d[i]*d[j] d[i] d i d[j] d j print(x//2) print x//2 x 2 d=list(map(int,input().split())) list(map(int,input().split())) d n=int(input()) int(input()) n x=0 0 x x+=d[i]*d[j] d[i]*d[j] x
n=int(input())
d=list(map(int,input().split()))
x=0
for i in range(n):
    for j in range(n):
        if i==j:
            continue
        else:
            x+=d[i]*d[j]
            
print(x//2)