n=int(input())
d_list=[int(i) for i in input().split()]
sum_list=[]


for i in range(n):
    for j in range(i+1,n):
        
        sum_list.append(d_list[i]*d_list[j])
        

print(sum(sum_list)) n=int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i d_list=[int(i) for i in input().split()] d_list [int(i) for i in input().split()] sum_list=[] sum_list [] for i in range(n):
    for j in range(i+1,n):
        
        sum_list.append(d_list[i]*d_list[j])
         i range(n) range n for j in range(i+1,n):
        
        sum_list.append(d_list[i]*d_list[j])
         j range(i+1,n) range i+1 i 1 n sum_list.append(d_list[i]*d_list[j]) sum_list.append sum_list append d_list[i]*d_list[j] d_list[i] d_list i d_list[j] d_list j print(sum(sum_list)) print sum(sum_list) sum sum_list n=int(input()) int(input()) n d_list=[int(i) for i in input().split()] [int(i) for i in input().split()] d_list sum_list=[] [] sum_list
n=int(input())
d_list=[int(i) for i in input().split()]
sum_list=[]


for i in range(n):
    for j in range(i+1,n):
        
        sum_list.append(d_list[i]*d_list[j])
        

print(sum(sum_list))
