N = int(input())
A = list(map(int,input().split()))
A.sort()
cnt = 0
for i in range(0,N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if (A[i]!=A[j]!=A[k]):
        if (A[i]+A[j])>A[k]:
          cnt+=1
        
print(cnt) N = int(input()) N int(input()) int input() input A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split A.sort() A.sort A sort cnt = 0 cnt 0 for i in range(0,N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if (A[i]!=A[j]!=A[k]):
        if (A[i]+A[j])>A[k]:
          cnt+=1
         i range(0,N) range 0 N for j in range(i+1,N):
    for k in range(j+1,N):
      if (A[i]!=A[j]!=A[k]):
        if (A[i]+A[j])>A[k]:
          cnt+=1
         j range(i+1,N) range i+1 i 1 N for k in range(j+1,N):
      if (A[i]!=A[j]!=A[k]):
        if (A[i]+A[j])>A[k]:
          cnt+=1
         k range(j+1,N) range j+1 j 1 N if (A[i]!=A[j]!=A[k]):
        if (A[i]+A[j])>A[k]:
          cnt+=1
         A[i]!=A[j]!=A[k] A[i]!=A[j] A[i] A i A[j] A j A[k] A k if (A[i]+A[j])>A[k]:
          cnt+=1
         (A[i]+A[j])>A[k] A[i]+A[j] A[i] A i A[j] A j A[k] A k cnt+=1 cnt 1 print(cnt) print cnt A = list(map(int,input().split())) list(map(int,input().split())) A cnt = 0 0 cnt cnt+=1 1 cnt N = int(input()) int(input()) N
N = int(input())
A = list(map(int,input().split()))
A.sort()
cnt = 0
for i in range(0,N):
  for j in range(i+1,N):
    for k in range(j+1,N):
      if (A[i]!=A[j]!=A[k]):
        if (A[i]+A[j])>A[k]:
          cnt+=1
        
print(cnt)