n = int(input())
arr = list(map(int, input().split()))
l = []
for i in range(n):
  for j in range(n):
    if i != j:
      l.append(arr[i] * arr[j])
print(sum(l) // 2) n = int(input()) n int(input()) int input() input arr = list(map(int, input().split())) arr list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split l = [] l [] for i in range(n):
  for j in range(n):
    if i != j:
      l.append(arr[i] * arr[j]) i range(n) range n for j in range(n):
    if i != j:
      l.append(arr[i] * arr[j]) j range(n) range n if i != j:
      l.append(arr[i] * arr[j]) i != j i j l.append(arr[i] * arr[j]) l.append l append arr[i] * arr[j] arr[i] arr i arr[j] arr j print(sum(l) // 2) print sum(l) // 2 sum(l) sum l 2 arr = list(map(int, input().split())) list(map(int, input().split())) arr n = int(input()) int(input()) n l = [] [] l
n = int(input())
arr = list(map(int, input().split()))
l = []
for i in range(n):
  for j in range(n):
    if i != j:
      l.append(arr[i] * arr[j])
print(sum(l) // 2)