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