from itertools import combinations

N = int(input())
d = list(map(int, input().split()))

info = list(combinations(d, 2))

ans = 0
for x, y in info:
    ans += x*y

print(ans) from itertools import combinations N = int(input()) N int(input()) int input() input d = list(map(int, input().split())) d list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split info = list(combinations(d, 2)) info list(combinations(d, 2)) list combinations(d, 2) combinations d 2 ans = 0 ans 0 for x, y in info:
    ans += x*y x y info ans += x*y ans x*y x y print(ans) print ans info = list(combinations(d, 2)) list(combinations(d, 2)) info N = int(input()) int(input()) N d = list(map(int, input().split())) list(map(int, input().split())) d ans += x*y x*y ans ans = 0 0 ans
from itertools import combinations

N = int(input())
d = list(map(int, input().split()))

info = list(combinations(d, 2))

ans = 0
for x, y in info:
    ans += x*y

print(ans)
