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

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

print(ans)