N = int(input())
d = [int(x) for x in input().split()]
print((pow(sum(d),2)-sum([pow(x,2) for x in d]))//2) 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 d = [int(x) for x in input().split()] d [int(x) for x in input().split()] pow(x,2) for x in d for x in d x d for x in d pow(x,2) pow x 2 print((pow(sum(d),2)-sum([pow(x,2) for x in d]))//2) print (pow(sum(d),2)-sum([pow(x,2) for x in d]))//2 pow(sum(d),2)-sum([pow(x,2) for x in d]) pow(sum(d),2) pow sum(d) sum d 2 sum([pow(x,2) for x in d]) sum [pow(x,2) for x in d] 2 N = int(input()) int(input()) N d = [int(x) for x in input().split()] [int(x) for x in input().split()] d
N = int(input())
d = [int(x) for x in input().split()]
print((pow(sum(d),2)-sum([pow(x,2) for x in d]))//2)