n = int(input())
a = [int(x) for x in input().split()]
result = 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] and a[i] != a[k] and a[j] != a[k]:
                if a[i] + a[j] > a[k] and a[i] + a[k] > a[j] and a[j] + a[k] > a[i]:
                    result += 1
print(result) 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 a = [int(x) for x in input().split()] a [int(x) for x in input().split()] result = 0 result 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] and a[i] != a[k] and a[j] != a[k]:
                if a[i] + a[j] > a[k] and a[i] + a[k] > a[j] and a[j] + a[k] > a[i]:
                    result += 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] and a[i] != a[k] and a[j] != a[k]:
                if a[i] + a[j] > a[k] and a[i] + a[k] > a[j] and a[j] + a[k] > a[i]:
                    result += 1 j range(i + 1, n) range i + 1 i 1 n for k in range(j +1 , n):
            if a[i] != a[j] and a[i] != a[k] and a[j] != a[k]:
                if a[i] + a[j] > a[k] and a[i] + a[k] > a[j] and a[j] + a[k] > a[i]:
                    result += 1 k range(j +1 , n) range j +1 j 1 n if a[i] != a[j] and a[i] != a[k] and a[j] != a[k]:
                if a[i] + a[j] > a[k] and a[i] + a[k] > a[j] and a[j] + a[k] > a[i]:
                    result += 1 a[i] != a[j] and a[i] != a[k] and a[j] != a[k] a[i] != a[j] and a[i] != a[k] a[i] != a[j] a[i] a i a[j] a j a[i] != a[k] a[i] a i a[k] a k a[j] != a[k] a[j] a j a[k] a k if a[i] + a[j] > a[k] and a[i] + a[k] > a[j] and a[j] + a[k] > a[i]:
                    result += 1 a[i] + a[j] > a[k] and a[i] + a[k] > a[j] and a[j] + a[k] > a[i] a[i] + a[j] > a[k] and a[i] + a[k] > 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[k] > a[j] a[i] + a[k] a[i] a i a[k] a k a[j] a j a[j] + a[k] > a[i] a[j] + a[k] a[j] a j a[k] a k a[i] a i result += 1 result 1 print(result) print result a = [int(x) for x in input().split()] [int(x) for x in input().split()] a result = 0 0 result result += 1 1 result n = int(input()) int(input()) n
n = int(input())
a = [int(x) for x in input().split()]
result = 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] and a[i] != a[k] and a[j] != a[k]:
                if a[i] + a[j] > a[k] and a[i] + a[k] > a[j] and a[j] + a[k] > a[i]:
                    result += 1
print(result)