N = int(input())
L = list(map(int, input().split()))
L.sort()

count = 0
for k in range(2, N):
  for j in range(1,k):
    for i in range(j):
      if L[i] + L[j] > L[k] and L[i] != L[j] and L[j] != L[k]:
        count += 1
      else:
        continue
        
print(count) N = int(input()) N int(input()) int input() input L = list(map(int, input().split())) L list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split L.sort() L.sort L sort count = 0 count 0 for k in range(2, N):
  for j in range(1,k):
    for i in range(j):
      if L[i] + L[j] > L[k] and L[i] != L[j] and L[j] != L[k]:
        count += 1
      else:
        continue
         k range(2, N) range 2 N for j in range(1,k):
    for i in range(j):
      if L[i] + L[j] > L[k] and L[i] != L[j] and L[j] != L[k]:
        count += 1
      else:
        continue
         j range(1,k) range 1 k for i in range(j):
      if L[i] + L[j] > L[k] and L[i] != L[j] and L[j] != L[k]:
        count += 1
      else:
        continue
         i range(j) range j if L[i] + L[j] > L[k] and L[i] != L[j] and L[j] != L[k]:
        count += 1
      else:
        continue
         L[i] + L[j] > L[k] and L[i] != L[j] and L[j] != L[k] L[i] + L[j] > L[k] and L[i] != L[j] L[i] + L[j] > L[k] L[i] + L[j] L[i] L i L[j] L j L[k] L k L[i] != L[j] L[i] L i L[j] L j L[j] != L[k] L[j] L j L[k] L k count += 1 count 1 continue print(count) print count count = 0 0 count L = list(map(int, input().split())) list(map(int, input().split())) L N = int(input()) int(input()) N count += 1 1 count
N = int(input())
L = list(map(int, input().split()))
L.sort()

count = 0
for k in range(2, N):
  for j in range(1,k):
    for i in range(j):
      if L[i] + L[j] > L[k] and L[i] != L[j] and L[j] != L[k]:
        count += 1
      else:
        continue
        
print(count)