n=int(input())
li=[int(x) for x in input().split()]
su=[]
for i in range(n-1):
  for j in range(i+1,n):
    su.append(li[i]*li[j])
print(sum(su)) n=int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x li=[int(x) for x in input().split()] li [int(x) for x in input().split()] su=[] su [] for i in range(n-1):
  for j in range(i+1,n):
    su.append(li[i]*li[j]) i range(n-1) range n-1 n 1 for j in range(i+1,n):
    su.append(li[i]*li[j]) j range(i+1,n) range i+1 i 1 n su.append(li[i]*li[j]) su.append su append li[i]*li[j] li[i] li i li[j] li j print(sum(su)) print sum(su) sum su n=int(input()) int(input()) n su=[] [] su li=[int(x) for x in input().split()] [int(x) for x in input().split()] li
n=int(input())
li=[int(x) for x in input().split()]
su=[]
for i in range(n-1):
  for j in range(i+1,n):
    su.append(li[i]*li[j])
print(sum(su))