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