a=int(input())

row=sorted(map(int,input().split()))

cnt=0

for i in range(len(row)):
  for j in range(i+1,len(row)):
    for k in range(j+1,len(row)):
      if row[i]!=row[j] and row[j]!=row[k] and row[i]!=row[k]:
        if (abs(row[j]-row[i]) < row[k]) and (row[k] < row[j]+row[i]):
          cnt+=1

print(cnt) a=int(input()) a int(input()) int input() input row=sorted(map(int,input().split())) row sorted(map(int,input().split())) sorted map(int,input().split()) map int input().split() ().split () input split cnt=0 cnt 0 for i in range(len(row)):
  for j in range(i+1,len(row)):
    for k in range(j+1,len(row)):
      if row[i]!=row[j] and row[j]!=row[k] and row[i]!=row[k]:
        if (abs(row[j]-row[i]) < row[k]) and (row[k] < row[j]+row[i]):
          cnt+=1 i range(len(row)) range len(row) len row for j in range(i+1,len(row)):
    for k in range(j+1,len(row)):
      if row[i]!=row[j] and row[j]!=row[k] and row[i]!=row[k]:
        if (abs(row[j]-row[i]) < row[k]) and (row[k] < row[j]+row[i]):
          cnt+=1 j range(i+1,len(row)) range i+1 i 1 len(row) len row for k in range(j+1,len(row)):
      if row[i]!=row[j] and row[j]!=row[k] and row[i]!=row[k]:
        if (abs(row[j]-row[i]) < row[k]) and (row[k] < row[j]+row[i]):
          cnt+=1 k range(j+1,len(row)) range j+1 j 1 len(row) len row if row[i]!=row[j] and row[j]!=row[k] and row[i]!=row[k]:
        if (abs(row[j]-row[i]) < row[k]) and (row[k] < row[j]+row[i]):
          cnt+=1 row[i]!=row[j] and row[j]!=row[k] and row[i]!=row[k] row[i]!=row[j] and row[j]!=row[k] row[i]!=row[j] row[i] row i row[j] row j row[j]!=row[k] row[j] row j row[k] row k row[i]!=row[k] row[i] row i row[k] row k if (abs(row[j]-row[i]) < row[k]) and (row[k] < row[j]+row[i]):
          cnt+=1 (abs(row[j]-row[i]) < row[k]) and (row[k] < row[j]+row[i]) abs(row[j]-row[i]) < row[k] abs(row[j]-row[i]) abs row[j]-row[i] row[j] row j row[i] row i row[k] row k row[k] < row[j]+row[i] row[k] row k row[j]+row[i] row[j] row j row[i] row i cnt+=1 cnt 1 print(cnt) print cnt row=sorted(map(int,input().split())) sorted(map(int,input().split())) row a=int(input()) int(input()) a cnt=0 0 cnt cnt+=1 1 cnt
a=int(input())

row=sorted(map(int,input().split()))

cnt=0

for i in range(len(row)):
  for j in range(i+1,len(row)):
    for k in range(j+1,len(row)):
      if row[i]!=row[j] and row[j]!=row[k] and row[i]!=row[k]:
        if (abs(row[j]-row[i]) < row[k]) and (row[k] < row[j]+row[i]):
          cnt+=1

print(cnt)