from itertools import combinations

n = int(input())
d = list(map(int, input().split()))
ans = 0
d = combinations(d, 2)
for i, j in d:
    ans += i*j
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 ans = 0 ans 0 d = combinations(d, 2) d combinations(d, 2) combinations d 2 for i, j in d:
    ans += i*j i j d ans += i*j ans i*j i j print(ans) print ans d = list(map(int, input().split())) list(map(int, input().split())) d ans = 0 0 ans ans += i*j i*j ans d = combinations(d, 2) combinations(d, 2) d n = int(input()) int(input()) n
from itertools import combinations

n = int(input())
d = list(map(int, input().split()))
ans = 0
d = combinations(d, 2)
for i, j in d:
    ans += i*j
print(ans)
