n=int(input())
if n<3:
  print(0)
else:
  L=[int(i) for i in input().split()]
  x=0
  for i in range(0,n-2):
    for j in range(i+1,n-1):
      for k in range(j+1,n):
        if L[i]==L[j] or L[j]==L[k] or L[k]==L[i]:
          pass
        elif L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i]:
          x+=1
        else:
          pass
  print(x) n=int(input()) n int(input()) int input() input if n<3:
  print(0)
else:
  L=[int(i) for i in input().split()]
  x=0
  for i in range(0,n-2):
    for j in range(i+1,n-1):
      for k in range(j+1,n):
        if L[i]==L[j] or L[j]==L[k] or L[k]==L[i]:
          pass
        elif L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i]:
          x+=1
        else:
          pass
  print(x) n<3 n 3 print(0) print 0 int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i L=[int(i) for i in input().split()] L [int(i) for i in input().split()] x=0 x 0 for i in range(0,n-2):
    for j in range(i+1,n-1):
      for k in range(j+1,n):
        if L[i]==L[j] or L[j]==L[k] or L[k]==L[i]:
          pass
        elif L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i]:
          x+=1
        else:
          pass
   i range(0,n-2) range 0 n-2 n 2 for j in range(i+1,n-1):
      for k in range(j+1,n):
        if L[i]==L[j] or L[j]==L[k] or L[k]==L[i]:
          pass
        elif L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i]:
          x+=1
        else:
          pass
   j range(i+1,n-1) range i+1 i 1 n-1 n 1 for k in range(j+1,n):
        if L[i]==L[j] or L[j]==L[k] or L[k]==L[i]:
          pass
        elif L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i]:
          x+=1
        else:
          pass
   k range(j+1,n) range j+1 j 1 n if L[i]==L[j] or L[j]==L[k] or L[k]==L[i]:
          pass
        elif L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i]:
          x+=1
        else:
          pass
   L[i]==L[j] or L[j]==L[k] or L[k]==L[i] L[i]==L[j] or L[j]==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 L[k]==L[i] L[k] L k L[i] L i elif L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i]:
          x+=1
         L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i] L[i]+L[j]>L[k] and L[i]+L[k]>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[k]>L[j] L[i]+L[k] L[i] L i L[k] L k L[j] L j L[j]+L[k]>L[i] L[j]+L[k] L[j] L j L[k] L k L[i] L i x+=1 x 1 print(x) print x L=[int(i) for i in input().split()] [int(i) for i in input().split()] L n=int(input()) int(input()) n x+=1 1 x x=0 0 x
n=int(input())
if n<3:
  print(0)
else:
  L=[int(i) for i in input().split()]
  x=0
  for i in range(0,n-2):
    for j in range(i+1,n-1):
      for k in range(j+1,n):
        if L[i]==L[j] or L[j]==L[k] or L[k]==L[i]:
          pass
        elif L[i]+L[j]>L[k] and L[i]+L[k]>L[j] and L[j]+L[k]>L[i]:
          x+=1
        else:
          pass
  print(x)