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


for i in range(N-2):
    for j in range(N-i-1):
        for k in range(N-i-j-2):
            if L[i]<L[i+j+1]<L[i+j+k+2]and L[i]+L[i+j+1]>L[i+j+k+2]:
                K=K+1
print(K) 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 K=0 K 0 for i in range(N-2):
    for j in range(N-i-1):
        for k in range(N-i-j-2):
            if L[i]<L[i+j+1]<L[i+j+k+2]and L[i]+L[i+j+1]>L[i+j+k+2]:
                K=K+1 i range(N-2) range N-2 N 2 for j in range(N-i-1):
        for k in range(N-i-j-2):
            if L[i]<L[i+j+1]<L[i+j+k+2]and L[i]+L[i+j+1]>L[i+j+k+2]:
                K=K+1 j range(N-i-1) range N-i-1 N-i N i 1 for k in range(N-i-j-2):
            if L[i]<L[i+j+1]<L[i+j+k+2]and L[i]+L[i+j+1]>L[i+j+k+2]:
                K=K+1 k range(N-i-j-2) range N-i-j-2 N-i-j N-i N i j 2 if L[i]<L[i+j+1]<L[i+j+k+2]and L[i]+L[i+j+1]>L[i+j+k+2]:
                K=K+1 L[i]<L[i+j+1]<L[i+j+k+2]and L[i]+L[i+j+1]>L[i+j+k+2] L[i]<L[i+j+1]<L[i+j+k+2] L[i]<L[i+j+1] L[i] L i L[i+j+1] L i+j+1 i+j i j 1 L[i+j+k+2] L i+j+k+2 i+j+k i+j i j k 2 L[i]+L[i+j+1]>L[i+j+k+2] L[i]+L[i+j+1] L[i] L i L[i+j+1] L i+j+1 i+j i j 1 L[i+j+k+2] L i+j+k+2 i+j+k i+j i j k 2 K=K+1 K K+1 K 1 print(K) print K L=list(map(int,input().split())) list(map(int,input().split())) L K=K+1 K+1 K K=0 0 K N=int(input()) int(input()) N
N=int(input())
L=list(map(int,input().split()))
L.sort()
K=0


for i in range(N-2):
    for j in range(N-i-1):
        for k in range(N-i-j-2):
            if L[i]<L[i+j+1]<L[i+j+k+2]and L[i]+L[i+j+1]>L[i+j+k+2]:
                K=K+1
print(K)