# https://atcoder.jp/contests/abc143/tasks/abc143_b
n=int(input())
item_list=list(map(int,input().split()))
c=int((n*(n-1))/2)
Answer=0
for i  in range(c):
    for k in range(i+1,n,1):
        Answer+=item_list[i]*item_list[k]

    
print(Answer) n=int(input()) n int(input()) int input() input item_list=list(map(int,input().split())) item_list list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split c=int((n*(n-1))/2) c int((n*(n-1))/2) int (n*(n-1))/2 n*(n-1) n n-1 n 1 2 Answer=0 Answer 0 for i  in range(c):
    for k in range(i+1,n,1):
        Answer+=item_list[i]*item_list[k]

     i range(c) range c for k in range(i+1,n,1):
        Answer+=item_list[i]*item_list[k]

     k range(i+1,n,1) range i+1 i 1 n 1 Answer+=item_list[i]*item_list[k] Answer item_list[i]*item_list[k] item_list[i] item_list i item_list[k] item_list k print(Answer) print Answer n=int(input()) int(input()) n item_list=list(map(int,input().split())) list(map(int,input().split())) item_list Answer+=item_list[i]*item_list[k] item_list[i]*item_list[k] Answer c=int((n*(n-1))/2) int((n*(n-1))/2) c Answer=0 0 Answer
# https://atcoder.jp/contests/abc143/tasks/abc143_b
n=int(input())
item_list=list(map(int,input().split()))
c=int((n*(n-1))/2)
Answer=0
for i  in range(c):
    for k in range(i+1,n,1):
        Answer+=item_list[i]*item_list[k]

    
print(Answer)