n = int(input())
arr = list(map(int, input().split()))

answer = 0
for num1 in range(0, len(arr) - 1):
    for num2 in range(num1+1, len(arr)):
        answer += (arr[num1] * arr[num2])

print(answer) 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 answer = 0 answer 0 for num1 in range(0, len(arr) - 1):
    for num2 in range(num1+1, len(arr)):
        answer += (arr[num1] * arr[num2]) num1 range(0, len(arr) - 1) range 0 len(arr) - 1 len(arr) len arr 1 for num2 in range(num1+1, len(arr)):
        answer += (arr[num1] * arr[num2]) num2 range(num1+1, len(arr)) range num1+1 num1 1 len(arr) len arr answer += (arr[num1] * arr[num2]) answer arr[num1] * arr[num2] arr[num1] arr num1 arr[num2] arr num2 print(answer) print answer answer = 0 0 answer arr = list(map(int, input().split())) list(map(int, input().split())) arr answer += (arr[num1] * arr[num2]) arr[num1] * arr[num2] answer n = int(input()) int(input()) n
n = int(input())
arr = list(map(int, input().split()))

answer = 0
for num1 in range(0, len(arr) - 1):
    for num2 in range(num1+1, len(arr)):
        answer += (arr[num1] * arr[num2])

print(answer)