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