import itertools
N = int(input())
D = list(input().split())
a = itertools.combinations(D,2)
sum= 0
for i,j in a:
    sum += eval("{} * {}".format(i,j))
print(sum) import itertools itertools N = int(input()) N int(input()) int input() input D = list(input().split()) D list(input().split()) list input().split() ().split () input split a = itertools.combinations(D,2) a itertools.combinations(D,2) itertools.combinations itertools combinations D 2 sum= 0 sum 0 for i,j in a:
    sum += eval("{} * {}".format(i,j)) i j a sum += eval("{} * {}".format(i,j)) sum eval("{} * {}".format(i,j)) eval "{} * {}".format(i,j) "{} * {}".format "{} * {}" format i j print(sum) print sum sum += eval("{} * {}".format(i,j)) eval("{} * {}".format(i,j)) sum D = list(input().split()) list(input().split()) D N = int(input()) int(input()) N a = itertools.combinations(D,2) itertools.combinations(D,2) a sum= 0 0 sum
import itertools
N = int(input())
D = list(input().split())
a = itertools.combinations(D,2)
sum= 0
for i,j in a:
    sum += eval("{} * {}".format(i,j))
print(sum)