N = int(input())
A = [int(a) for a in input().split()]
print((sum(A)**2 - sum([a**2 for a in A]))//2) N = int(input()) N int(input()) int input() input int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a A = [int(a) for a in input().split()] A [int(a) for a in input().split()] a**2 for a in A for a in A a A for a in A a**2 a 2 print((sum(A)**2 - sum([a**2 for a in A]))//2) print (sum(A)**2 - sum([a**2 for a in A]))//2 sum(A)**2 - sum([a**2 for a in A]) sum(A)**2 sum(A) sum A 2 sum([a**2 for a in A]) sum [a**2 for a in A] 2 N = int(input()) int(input()) N A = [int(a) for a in input().split()] [int(a) for a in input().split()] A
N = int(input())
A = [int(a) for a in input().split()]
print((sum(A)**2 - sum([a**2 for a in A]))//2)