n = int(input())
a = list(map(int,input().split()))
c = 0

for i in range(n):
    j = i + 1
    while j < n:
        c = c + (a[i] * a[j])
        j += 1

print(c) n = int(input()) n int(input()) int input() input a = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split c = 0 c 0 for i in range(n):
    j = i + 1
    while j < n:
        c = c + (a[i] * a[j])
        j += 1 i range(n) range n j = i + 1 j i + 1 i 1 while j < n:
        c = c + (a[i] * a[j])
        j += 1 j < n j n c = c + (a[i] * a[j]) c c + (a[i] * a[j]) c a[i] * a[j] a[i] a i a[j] a j j += 1 j 1 print(c) print c n = int(input()) int(input()) n c = 0 0 c c = c + (a[i] * a[j]) c + (a[i] * a[j]) c j += 1 1 j j = i + 1 i + 1 j a = list(map(int,input().split())) list(map(int,input().split())) a
n = int(input())
a = list(map(int,input().split()))
c = 0

for i in range(n):
    j = i + 1
    while j < n:
        c = c + (a[i] * a[j])
        j += 1

print(c)