n = int(input())
lst = list(map(int, input().split()))
res = 0
for i in range(n - 1):
  for j in range(i + 1, n):
    res += (lst[i] * lst[j])
print(res) n = int(input()) n int(input()) int input() input lst = list(map(int, input().split())) lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split res = 0 res 0 for i in range(n - 1):
  for j in range(i + 1, n):
    res += (lst[i] * lst[j]) i range(n - 1) range n - 1 n 1 for j in range(i + 1, n):
    res += (lst[i] * lst[j]) j range(i + 1, n) range i + 1 i 1 n res += (lst[i] * lst[j]) res lst[i] * lst[j] lst[i] lst i lst[j] lst j print(res) print res res += (lst[i] * lst[j]) lst[i] * lst[j] res lst = list(map(int, input().split())) list(map(int, input().split())) lst res = 0 0 res n = int(input()) int(input()) n
n = int(input())
lst = list(map(int, input().split()))
res = 0
for i in range(n - 1):
  for j in range(i + 1, n):
    res += (lst[i] * lst[j])
print(res)