N=int(input())
l=list(map(int, input().split()))
s=0
for i in range(N):
  for j in range(N):
    for k in range(N):
      if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] and l[j]<l[i]+l[k] and l[k]<l[i]+l[j]:
        s+=1
print(int(s/6)) 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 s=0 s 0 for i in range(N):
  for j in range(N):
    for k in range(N):
      if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] and l[j]<l[i]+l[k] and l[k]<l[i]+l[j]:
        s+=1 i range(N) range N for j in range(N):
    for k in range(N):
      if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] and l[j]<l[i]+l[k] and l[k]<l[i]+l[j]:
        s+=1 j range(N) range N for k in range(N):
      if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] and l[j]<l[i]+l[k] and l[k]<l[i]+l[j]:
        s+=1 k range(N) range N if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] and l[j]<l[i]+l[k] and l[k]<l[i]+l[j]:
        s+=1 l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] and l[j]<l[i]+l[k] and l[k]<l[i]+l[j] l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] and l[j]<l[i]+l[k] l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] l[i]!=l[j] and 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 l[i]<l[j]+l[k] l[i] l i l[j]+l[k] l[j] l j l[k] l k l[j]<l[i]+l[k] l[j] l j l[i]+l[k] l[i] l i l[k] l k l[k]<l[i]+l[j] l[k] l k l[i]+l[j] l[i] l i l[j] l j s+=1 s 1 print(int(s/6)) print int(s/6) int s/6 s 6 l=list(map(int, input().split())) list(map(int, input().split())) l s+=1 1 s s=0 0 s N=int(input()) int(input()) N
N=int(input())
l=list(map(int, input().split()))
s=0
for i in range(N):
  for j in range(N):
    for k in range(N):
      if l[i]!=l[j] and l[j]!=l[k] and l[k]!=l[i] and l[i]<l[j]+l[k] and l[j]<l[i]+l[k] and l[k]<l[i]+l[j]:
        s+=1
print(int(s/6))
