n = int(input())
d = list(map(int, input().split()))
sum = 0

for i in range(n):
    for j in range(n):
        if i > j:
            sum += d[i]*d[j]
            
print(sum) n = int(input()) n int(input()) int input() input d = list(map(int, input().split())) d list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split sum = 0 sum 0 for i in range(n):
    for j in range(n):
        if i > j:
            sum += d[i]*d[j]
             i range(n) range n for j in range(n):
        if i > j:
            sum += d[i]*d[j]
             j range(n) range n if i > j:
            sum += d[i]*d[j]
             i > j i j sum += d[i]*d[j] sum d[i]*d[j] d[i] d i d[j] d j print(sum) print sum sum = 0 0 sum d = list(map(int, input().split())) list(map(int, input().split())) d n = int(input()) int(input()) n sum += d[i]*d[j] d[i]*d[j] sum
n = int(input())
d = list(map(int, input().split()))
sum = 0

for i in range(n):
    for j in range(n):
        if i > j:
            sum += d[i]*d[j]
            
print(sum)