Module module1
  Sub main()
    Dim N as integer = Console.ReadLine()
    Dim L() = split(Console.ReadLine())
    
    Dim i, j, k
    
    Dim ans as Integer = 0
    
    for i = 0 To N - 3
    for j = i + 1 To N - 2
    for k = j + 1 To N - 1
    
    if Cint(L(i)) = Cint(L(j)) Or Cint(L(j)) = Cint(L(k)) Or Cint(L(k)) = Cint(L(i)) then
    else
      if Cint(L(i)) + Cint(L(j)) > Cint(L(k)) And Cint(L(j)) + Cint(L(k)) > Cint(L(i)) And Cint(L(k)) + Cint(L(i)) > Cint(L(j)) then
        ans = ans + 1
      end if
    end if
  next
next
next
Console.Write(ans)
end sub
end module