#!/usr/bin/env python3
N = int(input())
D = [int(s) for s in input().split()]

life = 0

for i in range(N):
    for j in range(i+1, N):
        life += D[i] * D[j]

print(life) 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()] life = 0 life 0 for i in range(N):
    for j in range(i+1, N):
        life += D[i] * D[j] i range(N) range N for j in range(i+1, N):
        life += D[i] * D[j] j range(i+1, N) range i+1 i 1 N life += D[i] * D[j] life D[i] * D[j] D[i] D i D[j] D j print(life) print life life += D[i] * D[j] D[i] * D[j] life N = int(input()) int(input()) N D = [int(s) for s in input().split()] [int(s) for s in input().split()] D life = 0 0 life
#!/usr/bin/env python3
N = int(input())
D = [int(s) for s in input().split()]

life = 0

for i in range(N):
    for j in range(i+1, N):
        life += D[i] * D[j]

print(life)
