n = int(input())
l = list(map(int,input().split()))
c= 0

for i in range(n):
  for j in range(n):
    for k in range(n):
      if l[i] + l[j] > l[k] and l[j]+l[k]>l[i] and l[k]+l[i]>l[j]  and i<j and j<k and l[i] != l[j] != l[k] != l[i]:
        c += 1

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

for i in range(n):
  for j in range(n):
    for k in range(n):
      if l[i] + l[j] > l[k] and l[j]+l[k]>l[i] and l[k]+l[i]>l[j]  and i<j and j<k and l[i] != l[j] != l[k] != l[i]:
        c += 1

print(c)
