import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions
from operator import itemgetter
import itertools


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
n = int(input())
d = readints()
x = (list(itertools.combinations(d, 2)))
ans = 0
for i in range(len(x)):
    ans += x[i][0]*x[i][1]
print(ans) import math math import string string import collections collections from collections import Counter from collections import deque from decimal import Decimal import sys sys import fractions fractions from operator import itemgetter import itertools itertools def readints():
    return list(map(int, input().split())) readints return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r)) nCr return math.factorial(n)//(math.factorial(n-r)*math.factorial(r)) math.factorial(n)//(math.factorial(n-r)*math.factorial(r)) math.factorial(n) math.factorial math factorial n math.factorial(n-r)*math.factorial(r) math.factorial(n-r) math.factorial math factorial n-r n r math.factorial(r) math.factorial math factorial r n n r r def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen) has_duplicates2 seen = [] seen [] for item in seq:
        if not(item in seen):
            seen.append(item)
     item seq if not(item in seen):
            seen.append(item)
     not(item in seen) item in seen item seen seen.append(item) seen.append seen append item return len(seq) != len(seen) len(seq) != len(seen) len(seq) len seq len(seen) len seen seq seq def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates divisor divisor = [] divisor [] for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
     i range(1, n+1) range 1 n+1 n 1 if n % i == 0:
            divisor.append(i)
     n % i == 0 n % i n i 0 divisor.append(i) divisor.append divisor append i return divisor divisor n n dx = [-1, -1, -1, 0, 0, 1, 1, 1] dx [-1, -1, -1, 0, 0, 1, 1, 1] -1 -1 -1 0 0 1 1 1 dy = [-1, 0, 1, -1, 1, -1, 0, 1] dy [-1, 0, 1, -1, 1, -1, 0, 1] -1 0 1 -1 1 -1 0 1 n = int(input()) n int(input()) int input() input d = readints() d readints() readints x = (list(itertools.combinations(d, 2))) x list(itertools.combinations(d, 2)) list itertools.combinations(d, 2) itertools.combinations itertools combinations d 2 ans = 0 ans 0 for i in range(len(x)):
    ans += x[i][0]*x[i][1] i range(len(x)) range len(x) len x ans += x[i][0]*x[i][1] ans x[i][0]*x[i][1] x[i][0] [i] x i 0 x[i][1] [i] x i 1 print(ans) print ans n = int(input()) int(input()) n d = readints() readints() d ans = 0 0 ans def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r)) def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r)) nCr def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates divisor x = (list(itertools.combinations(d, 2))) list(itertools.combinations(d, 2)) x dx = [-1, -1, -1, 0, 0, 1, 1, 1] [-1, -1, -1, 0, 0, 1, 1, 1] dx def readints():
    return list(map(int, input().split())) def readints():
    return list(map(int, input().split())) readints dy = [-1, 0, 1, -1, 1, -1, 0, 1] [-1, 0, 1, -1, 1, -1, 0, 1] dy ans += x[i][0]*x[i][1] x[i][0]*x[i][1] ans def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen) def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen) has_duplicates2
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions
from operator import itemgetter
import itertools


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
n = int(input())
d = readints()
x = (list(itertools.combinations(d, 2)))
ans = 0
for i in range(len(x)):
    ans += x[i][0]*x[i][1]
print(ans)
