n = int(input())
d = [int(s) for s in input().split()]

total = 0

for i in range(n - 1):
    for j in range(i + 1, n):
        total += d[i] * d[j]
print(total) n = int(input()) n int(input()) int input() input int(s) for s in input().split() for s in input().split() s input().split() ().split () input split for s in input().split() int(s) int s d = [int(s) for s in input().split()] d [int(s) for s in input().split()] total = 0 total 0 for i in range(n - 1):
    for j in range(i + 1, n):
        total += d[i] * d[j] i range(n - 1) range n - 1 n 1 for j in range(i + 1, n):
        total += d[i] * d[j] j range(i + 1, n) range i + 1 i 1 n total += d[i] * d[j] total d[i] * d[j] d[i] d i d[j] d j print(total) print total n = int(input()) int(input()) n d = [int(s) for s in input().split()] [int(s) for s in input().split()] d total = 0 0 total total += d[i] * d[j] d[i] * d[j] total
n = int(input())
d = [int(s) for s in input().split()]

total = 0

for i in range(n - 1):
    for j in range(i + 1, n):
        total += d[i] * d[j]
print(total)
