n = int( input())
list = list(map(int, input().split()))
list = sorted(list)
count = 0
for i in range(n-2):
    for j in range(i+1, n):
        for k in range(j+1, n):
            if list[j]+list[i] > list[k] and list[i] != list[j] and list[j] != list[k]:
                count += 1
print(count) n = int( input()) n int( input()) int input() input list = list(map(int, input().split())) list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split list = sorted(list) list sorted(list) sorted list count = 0 count 0 for i in range(n-2):
    for j in range(i+1, n):
        for k in range(j+1, n):
            if list[j]+list[i] > list[k] and list[i] != list[j] and list[j] != list[k]:
                count += 1 i range(n-2) range n-2 n 2 for j in range(i+1, n):
        for k in range(j+1, n):
            if list[j]+list[i] > list[k] and list[i] != list[j] and list[j] != list[k]:
                count += 1 j range(i+1, n) range i+1 i 1 n for k in range(j+1, n):
            if list[j]+list[i] > list[k] and list[i] != list[j] and list[j] != list[k]:
                count += 1 k range(j+1, n) range j+1 j 1 n if list[j]+list[i] > list[k] and list[i] != list[j] and list[j] != list[k]:
                count += 1 list[j]+list[i] > list[k] and list[i] != list[j] and list[j] != list[k] list[j]+list[i] > list[k] and list[i] != list[j] list[j]+list[i] > list[k] list[j]+list[i] list[j] list j list[i] list i list[k] list k list[i] != list[j] list[i] list i list[j] list j list[j] != list[k] list[j] list j list[k] list k count += 1 count 1 print(count) print count n = int( input()) int( input()) n list = list(map(int, input().split())) list(map(int, input().split())) list count += 1 1 count count = 0 0 count list = sorted(list) sorted(list) list
n = int( input())
list = list(map(int, input().split()))
list = sorted(list)
count = 0
for i in range(n-2):
    for j in range(i+1, n):
        for k in range(j+1, n):
            if list[j]+list[i] > list[k] and list[i] != list[j] and list[j] != list[k]:
                count += 1
print(count)