n = int(input())
numList = map(int,input().split())
numList = list(numList)

multiplyList = []
start = 0
for i in range(n+1):
    start += 1
    for j in range(start, n):
        multiplyList.append(numList[i] * numList[j])

print(sum(multiplyList)) n = int(input()) n int(input()) int input() input numList = map(int,input().split()) numList map(int,input().split()) map int input().split() ().split () input split numList = list(numList) numList list(numList) list numList multiplyList = [] multiplyList [] start = 0 start 0 for i in range(n+1):
    start += 1
    for j in range(start, n):
        multiplyList.append(numList[i] * numList[j]) i range(n+1) range n+1 n 1 start += 1 start 1 for j in range(start, n):
        multiplyList.append(numList[i] * numList[j]) j range(start, n) range start n multiplyList.append(numList[i] * numList[j]) multiplyList.append multiplyList append numList[i] * numList[j] numList[i] numList i numList[j] numList j print(sum(multiplyList)) print sum(multiplyList) sum multiplyList numList = map(int,input().split()) map(int,input().split()) numList multiplyList = [] [] multiplyList n = int(input()) int(input()) n start += 1 1 start start = 0 0 start numList = list(numList) list(numList) numList
n = int(input())
numList = map(int,input().split())
numList = list(numList)

multiplyList = []
start = 0
for i in range(n+1):
    start += 1
    for j in range(start, n):
        multiplyList.append(numList[i] * numList[j])

print(sum(multiplyList))