import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
d = LI()
ans = 0
l = list(itertools.combinations(d,2))
for i, j in l:
    ans += i*j
print(ans) import bisect,collections,copy,heapq,itertools,math,string bisect collections copy heapq itertools math string import sys sys def S(): return sys.stdin.readline().rstrip() S def M(): return map(int,sys.stdin.readline().rstrip().split()) M def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) LS N = I() N I() I d = LI() d LI() LI ans = 0 ans 0 l = list(itertools.combinations(d,2)) l list(itertools.combinations(d,2)) list itertools.combinations(d,2) itertools.combinations itertools combinations d 2 for i, j in l:
    ans += i*j i j l ans += i*j ans i*j i j print(ans) print ans def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS ans = 0 0 ans l = list(itertools.combinations(d,2)) list(itertools.combinations(d,2)) l def M(): return map(int,sys.stdin.readline().rstrip().split()) def M(): return map(int,sys.stdin.readline().rstrip().split()) M d = LI() LI() d def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I N = I() I() N ans += i*j i*j ans def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
d = LI()
ans = 0
l = list(itertools.combinations(d,2))
for i, j in l:
    ans += i*j
print(ans)