n=int(input())
list=list(map(int, input().split()))
def pair(parameter):
        pairedList = []
        for iterater1 in range(len(parameter)):
                for iterater2 in range(iterater1+1,len(parameter)):
                        pairedList.append([parameter[iterater1],parameter[iterater2]])
        return pairedList

pairings = pair(list)
count=0
add=0
for i in pairings:
    x=i[0]*i[1]
    add+=x
print(add) n=int(input()) n int(input()) int input() input list=list(map(int, input().split())) list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def pair(parameter):
        pairedList = []
        for iterater1 in range(len(parameter)):
                for iterater2 in range(iterater1+1,len(parameter)):
                        pairedList.append([parameter[iterater1],parameter[iterater2]])
        return pairedList pair pairedList = [] pairedList [] for iterater1 in range(len(parameter)):
                for iterater2 in range(iterater1+1,len(parameter)):
                        pairedList.append([parameter[iterater1],parameter[iterater2]])
         iterater1 range(len(parameter)) range len(parameter) len parameter for iterater2 in range(iterater1+1,len(parameter)):
                        pairedList.append([parameter[iterater1],parameter[iterater2]])
         iterater2 range(iterater1+1,len(parameter)) range iterater1+1 iterater1 1 len(parameter) len parameter pairedList.append([parameter[iterater1],parameter[iterater2]]) pairedList.append pairedList append [parameter[iterater1],parameter[iterater2]] parameter[iterater1] parameter iterater1 parameter[iterater2] parameter iterater2 return pairedList pairedList parameter parameter pairings = pair(list) pairings pair(list) pair list count=0 count 0 add=0 add 0 for i in pairings:
    x=i[0]*i[1]
    add+=x i pairings x=i[0]*i[1] x i[0]*i[1] i[0] i 0 i[1] i 1 add+=x add x print(add) print add add+=x x add pairings = pair(list) pair(list) pairings n=int(input()) int(input()) n count=0 0 count list=list(map(int, input().split())) list(map(int, input().split())) list def pair(parameter):
        pairedList = []
        for iterater1 in range(len(parameter)):
                for iterater2 in range(iterater1+1,len(parameter)):
                        pairedList.append([parameter[iterater1],parameter[iterater2]])
        return pairedList def pair(parameter):
        pairedList = []
        for iterater1 in range(len(parameter)):
                for iterater2 in range(iterater1+1,len(parameter)):
                        pairedList.append([parameter[iterater1],parameter[iterater2]])
        return pairedList pair x=i[0]*i[1] i[0]*i[1] x add=0 0 add
n=int(input())
list=list(map(int, input().split()))
def pair(parameter):
        pairedList = []
        for iterater1 in range(len(parameter)):
                for iterater2 in range(iterater1+1,len(parameter)):
                        pairedList.append([parameter[iterater1],parameter[iterater2]])
        return pairedList

pairings = pair(list)
count=0
add=0
for i in pairings:
    x=i[0]*i[1]
    add+=x
print(add)
