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

m = 1
num = 0
for s in range(0,n-1):
    for t in range(m,n):
        num += (d[s]*d[t])
    m += 1
print(num)   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 m = 1 m 1 num = 0 num 0 for s in range(0,n-1):
    for t in range(m,n):
        num += (d[s]*d[t])
    m += 1 s range(0,n-1) range 0 n-1 n 1 for t in range(m,n):
        num += (d[s]*d[t])
     t range(m,n) range m n num += (d[s]*d[t]) num d[s]*d[t] d[s] d s d[t] d t m += 1 m 1 print(num) print num n = int(input()) int(input()) n m = 1 1 m d = list(map(int, input().split())) list(map(int, input().split())) d m += 1 1 m num += (d[s]*d[t]) d[s]*d[t] num num = 0 0 num
n = int(input())
d = list(map(int, input().split()))

m = 1
num = 0
for s in range(0,n-1):
    for t in range(m,n):
        num += (d[s]*d[t])
    m += 1
print(num)  