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

lst = list(itertools.combinations(d, 2))
total = 0
for n in lst:
    c = n[0] * n[1]
    total += c
print(total) import itertools itertools 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 lst = list(itertools.combinations(d, 2)) lst list(itertools.combinations(d, 2)) list itertools.combinations(d, 2) itertools.combinations itertools combinations d 2 total = 0 total 0 for n in lst:
    c = n[0] * n[1]
    total += c n lst c = n[0] * n[1] c n[0] * n[1] n[0] n 0 n[1] n 1 total += c total c print(total) print total N = int(input()) int(input()) N total = 0 0 total c = n[0] * n[1] n[0] * n[1] c total += c c total lst = list(itertools.combinations(d, 2)) list(itertools.combinations(d, 2)) lst d = list(map(int, input().split())) list(map(int, input().split())) d
import itertools
N = int(input())
d = list(map(int, input().split()))

lst = list(itertools.combinations(d, 2))
total = 0
for n in lst:
    c = n[0] * n[1]
    total += c
print(total)