n = int(input())
a = list(map(int, input().split()))
a.sort()

cnt = 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[j] != a[k] and a[k] != a[i] and a[i] + a[j] > a[k]:
                cnt += 1

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

cnt = 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[j] != a[k] and a[k] != a[i] and a[i] + a[j] > a[k]:
                cnt += 1

print(cnt)