n=int(input())
Ns=list(map(int, input().split() ) ) 
ans=0
for i in range(n):
  for j in range(i,n):
    for k in range(j,n):
      a , b , c = sorted([Ns[i] , Ns[j] , Ns[k]])
      if a+b>c and a!=b and b!=c:
        ans+=1
print(ans) n=int(input()) n int(input()) int input() input Ns=list(map(int, input().split() ) ) Ns list(map(int, input().split() ) ) list map(int, input().split() ) map int input().split() ().split () input split ans=0 ans 0 for i in range(n):
  for j in range(i,n):
    for k in range(j,n):
      a , b , c = sorted([Ns[i] , Ns[j] , Ns[k]])
      if a+b>c and a!=b and b!=c:
        ans+=1 i range(n) range n for j in range(i,n):
    for k in range(j,n):
      a , b , c = sorted([Ns[i] , Ns[j] , Ns[k]])
      if a+b>c and a!=b and b!=c:
        ans+=1 j range(i,n) range i n for k in range(j,n):
      a , b , c = sorted([Ns[i] , Ns[j] , Ns[k]])
      if a+b>c and a!=b and b!=c:
        ans+=1 k range(j,n) range j n a , b , c = sorted([Ns[i] , Ns[j] , Ns[k]]) a sorted([Ns[i] , Ns[j] , Ns[k]]) sorted [Ns[i] , Ns[j] , Ns[k]] Ns[i] Ns i Ns[j] Ns j Ns[k] Ns k b c if a+b>c and a!=b and b!=c:
        ans+=1 a+b>c and a!=b and b!=c a+b>c and a!=b a+b>c a+b a b c a!=b a b b!=c b c ans+=1 ans 1 print(ans) print ans ans=0 0 ans b , c = sorted([Ns[i] , Ns[j] , Ns[k]]) sorted([Ns[i] , Ns[j] , Ns[k]]) b ans+=1 1 ans c = sorted([Ns[i] , Ns[j] , Ns[k]]) sorted([Ns[i] , Ns[j] , Ns[k]]) c n=int(input()) int(input()) n a , b , c = sorted([Ns[i] , Ns[j] , Ns[k]]) sorted([Ns[i] , Ns[j] , Ns[k]]) a Ns=list(map(int, input().split() ) ) list(map(int, input().split() ) ) Ns
n=int(input())
Ns=list(map(int, input().split() ) ) 
ans=0
for i in range(n):
  for j in range(i,n):
    for k in range(j,n):
      a , b , c = sorted([Ns[i] , Ns[j] , Ns[k]])
      if a+b>c and a!=b and b!=c:
        ans+=1
print(ans)
