N = int(input())
d = list(map(int, input().split()))
sumd = sum(d)
d_2 = sum([i * i for i in d])
print((sumd*sumd-d_2)//2) 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 sumd = sum(d) sumd sum(d) sum d i * i for i in d for i in d i d for i in d i * i i i d_2 = sum([i * i for i in d]) d_2 sum([i * i for i in d]) sum [i * i for i in d] print((sumd*sumd-d_2)//2) print (sumd*sumd-d_2)//2 sumd*sumd-d_2 sumd*sumd sumd sumd d_2 2 d = list(map(int, input().split())) list(map(int, input().split())) d sumd = sum(d) sum(d) sumd d_2 = sum([i * i for i in d]) sum([i * i for i in d]) d_2 N = int(input()) int(input()) N
N = int(input())
d = list(map(int, input().split()))
sumd = sum(d)
d_2 = sum([i * i for i in d])
print((sumd*sumd-d_2)//2)
