n = int(input())
l = list(map(int,input().split()))
ans = 0
for i1, i2 in enumerate(l):
    for j in l[i1+1:]:
        ans += i2 * j
print(ans) n = int(input()) n int(input()) int input() input l = list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans = 0 ans 0 for i1, i2 in enumerate(l):
    for j in l[i1+1:]:
        ans += i2 * j i1 i2 enumerate(l) enumerate l for j in l[i1+1:]:
        ans += i2 * j j l[i1+1:] l i1+1: i1+1 i1 1 ans += i2 * j ans i2 * j i2 j print(ans) print ans ans += i2 * j i2 * j ans l = list(map(int,input().split())) list(map(int,input().split())) l ans = 0 0 ans n = int(input()) int(input()) n
n = int(input())
l = list(map(int,input().split()))
ans = 0
for i1, i2 in enumerate(l):
    for j in l[i1+1:]:
        ans += i2 * j
print(ans)