N = int(input())
A = list(map(int, input().split()))
A.sort()
ans = 0
for i in range(N):
    for j in range(i + 1, N):
        for k in range(j + 1, N):
            if A[i] + A[j] > A[k] and A[i] != A[j] and A[j] != A[k] and A[k] != A[i]:
                ans += 1
print(ans) N = int(input()) N int(input()) int input() input A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split A.sort() A.sort A sort ans = 0 ans 0 for i in range(N):
    for j in range(i + 1, N):
        for k in range(j + 1, N):
            if A[i] + A[j] > A[k] and A[i] != A[j] and A[j] != A[k] and A[k] != A[i]:
                ans += 1 i range(N) range N for j in range(i + 1, N):
        for k in range(j + 1, N):
            if A[i] + A[j] > A[k] and A[i] != A[j] and A[j] != A[k] and A[k] != A[i]:
                ans += 1 j range(i + 1, N) range i + 1 i 1 N for k in range(j + 1, N):
            if A[i] + A[j] > A[k] and A[i] != A[j] and A[j] != A[k] and A[k] != A[i]:
                ans += 1 k range(j + 1, N) range j + 1 j 1 N if A[i] + A[j] > A[k] and A[i] != A[j] and A[j] != A[k] and A[k] != A[i]:
                ans += 1 A[i] + A[j] > A[k] and A[i] != A[j] and A[j] != A[k] and A[k] != A[i] A[i] + A[j] > A[k] and A[i] != A[j] and A[j] != A[k] A[i] + A[j] > A[k] and A[i] != A[j] A[i] + A[j] > A[k] A[i] + A[j] A[i] A i A[j] A j A[k] A k A[i] != A[j] A[i] A i A[j] A j A[j] != A[k] A[j] A j A[k] A k A[k] != A[i] A[k] A k A[i] A i ans += 1 ans 1 print(ans) print ans A = list(map(int, input().split())) list(map(int, input().split())) A ans += 1 1 ans ans = 0 0 ans N = int(input()) int(input()) N
N = int(input())
A = list(map(int, input().split()))
A.sort()
ans = 0
for i in range(N):
    for j in range(i + 1, N):
        for k in range(j + 1, N):
            if A[i] + A[j] > A[k] and A[i] != A[j] and A[j] != A[k] and A[k] != A[i]:
                ans += 1
print(ans)
