n = int(input())

arr = list(map(int, input().split()))
arr.sort()

ans = 0

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

arr = list(map(int, input().split()))
arr.sort()

ans = 0

for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            if (arr[i] != arr[j]) and (arr[j] != arr[k]) and (arr[i] != arr[k]):
                if (arr[i]+arr[j]) > arr[k]:
                    ans += 1
                
print(ans)