N=int(input())
sides=[int(x) for x in input().split()]
counter=0
for i in range(N-2):
	for j in range(i+1,N-1):
		for k in range(j+1,N):
			A=sorted([sides[i],sides[j],sides[k]])
			if (A[0]+A[1]>A[2]) and A[0]!=A[1] and A[1]!=A[2] and A[0]!=A[2]:
				counter+=1
				
print(counter) N=int(input()) N int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x sides=[int(x) for x in input().split()] sides [int(x) for x in input().split()] counter=0 counter 0 for i in range(N-2):
	for j in range(i+1,N-1):
		for k in range(j+1,N):
			A=sorted([sides[i],sides[j],sides[k]])
			if (A[0]+A[1]>A[2]) and A[0]!=A[1] and A[1]!=A[2] and A[0]!=A[2]:
				counter+=1
				 i range(N-2) range N-2 N 2 for j in range(i+1,N-1):
		for k in range(j+1,N):
			A=sorted([sides[i],sides[j],sides[k]])
			if (A[0]+A[1]>A[2]) and A[0]!=A[1] and A[1]!=A[2] and A[0]!=A[2]:
				counter+=1
				 j range(i+1,N-1) range i+1 i 1 N-1 N 1 for k in range(j+1,N):
			A=sorted([sides[i],sides[j],sides[k]])
			if (A[0]+A[1]>A[2]) and A[0]!=A[1] and A[1]!=A[2] and A[0]!=A[2]:
				counter+=1
				 k range(j+1,N) range j+1 j 1 N A=sorted([sides[i],sides[j],sides[k]]) A sorted([sides[i],sides[j],sides[k]]) sorted [sides[i],sides[j],sides[k]] sides[i] sides i sides[j] sides j sides[k] sides k if (A[0]+A[1]>A[2]) and A[0]!=A[1] and A[1]!=A[2] and A[0]!=A[2]:
				counter+=1
				 (A[0]+A[1]>A[2]) and A[0]!=A[1] and A[1]!=A[2] and A[0]!=A[2] (A[0]+A[1]>A[2]) and A[0]!=A[1] and A[1]!=A[2] (A[0]+A[1]>A[2]) and A[0]!=A[1] A[0]+A[1]>A[2] A[0]+A[1] A[0] A 0 A[1] A 1 A[2] A 2 A[0]!=A[1] A[0] A 0 A[1] A 1 A[1]!=A[2] A[1] A 1 A[2] A 2 A[0]!=A[2] A[0] A 0 A[2] A 2 counter+=1 counter 1 print(counter) print counter counter=0 0 counter N=int(input()) int(input()) N counter+=1 1 counter sides=[int(x) for x in input().split()] [int(x) for x in input().split()] sides A=sorted([sides[i],sides[j],sides[k]]) sorted([sides[i],sides[j],sides[k]]) A
N=int(input())
sides=[int(x) for x in input().split()]
counter=0
for i in range(N-2):
	for j in range(i+1,N-1):
		for k in range(j+1,N):
			A=sorted([sides[i],sides[j],sides[k]])
			if (A[0]+A[1]>A[2]) and A[0]!=A[1] and A[1]!=A[2] and A[0]!=A[2]:
				counter+=1
				
print(counter)