def resolve():
    N = int(input())
    pow = list(map(int, input().split()))
    ans = []
    for i in range(N):
        for j in range(N):
            if i != j:
                ans.append(pow[i]*pow[j])
    print((sum(ans))//2)
resolve() def resolve():
    N = int(input())
    pow = list(map(int, input().split()))
    ans = []
    for i in range(N):
        for j in range(N):
            if i != j:
                ans.append(pow[i]*pow[j])
    print((sum(ans))//2) resolve N = int(input()) N int(input()) int input() input pow = list(map(int, input().split())) pow list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ans = [] ans [] for i in range(N):
        for j in range(N):
            if i != j:
                ans.append(pow[i]*pow[j])
     i range(N) range N for j in range(N):
            if i != j:
                ans.append(pow[i]*pow[j])
     j range(N) range N if i != j:
                ans.append(pow[i]*pow[j])
     i != j i j ans.append(pow[i]*pow[j]) ans.append ans append pow[i]*pow[j] pow[i] pow i pow[j] pow j print((sum(ans))//2) print (sum(ans))//2 sum(ans) sum ans 2 resolve() resolve def resolve():
    N = int(input())
    pow = list(map(int, input().split()))
    ans = []
    for i in range(N):
        for j in range(N):
            if i != j:
                ans.append(pow[i]*pow[j])
    print((sum(ans))//2) def resolve():
    N = int(input())
    pow = list(map(int, input().split()))
    ans = []
    for i in range(N):
        for j in range(N):
            if i != j:
                ans.append(pow[i]*pow[j])
    print((sum(ans))//2) resolve
def resolve():
    N = int(input())
    pow = list(map(int, input().split()))
    ans = []
    for i in range(N):
        for j in range(N):
            if i != j:
                ans.append(pow[i]*pow[j])
    print((sum(ans))//2)
resolve()