# coding: utf-8
# Your code here!

N = int(input())
d = list(map(int, input().split()))
dc = d[:]

ans = []

for i, v in enumerate(d):    
    for j, w in enumerate(dc):
        # print(i, j)
        if (i == j):
            continue        
        ans.append(v * w)

print(int(sum(ans)/2)) 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 dc = d[:] dc d[:] d : ans = [] ans [] for i, v in enumerate(d):    
    for j, w in enumerate(dc):
        # print(i, j)
        if (i == j):
            continue        
        ans.append(v * w) i v enumerate(d) enumerate d for j, w in enumerate(dc):
        # print(i, j)
        if (i == j):
            continue        
        ans.append(v * w) j w enumerate(dc) enumerate dc if (i == j):
            continue        
         i == j i j continue ans.append(v * w) ans.append ans append v * w v w print(int(sum(ans)/2)) print int(sum(ans)/2) int sum(ans)/2 sum(ans) sum ans 2 ans = [] [] ans d = list(map(int, input().split())) list(map(int, input().split())) d dc = d[:] d[:] dc N = int(input()) int(input()) N
# coding: utf-8
# Your code here!

N = int(input())
d = list(map(int, input().split()))
dc = d[:]

ans = []

for i, v in enumerate(d):    
    for j, w in enumerate(dc):
        # print(i, j)
        if (i == j):
            continue        
        ans.append(v * w)

print(int(sum(ans)/2))