n = int(input())
ls = sorted(list(map(int,input().split())))

ans = 0
for i in range(len(ls)-2) :
  a = ls[i]
  for j in range(len(ls)-i-2) :
    b = ls[i+1+j]
    for k in range(len(ls)-i-j-1) :
      c = ls[i+j+k+1]
      if b-a < c < b+a and a!=b!=c!=a :
        ans += 1
print(ans) n = int(input()) n int(input()) int input() input ls = sorted(list(map(int,input().split()))) ls sorted(list(map(int,input().split()))) sorted list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans = 0 ans 0 for i in range(len(ls)-2) :
  a = ls[i]
  for j in range(len(ls)-i-2) :
    b = ls[i+1+j]
    for k in range(len(ls)-i-j-1) :
      c = ls[i+j+k+1]
      if b-a < c < b+a and a!=b!=c!=a :
        ans += 1 i range(len(ls)-2) range len(ls)-2 len(ls) len ls 2 a = ls[i] a ls[i] ls i for j in range(len(ls)-i-2) :
    b = ls[i+1+j]
    for k in range(len(ls)-i-j-1) :
      c = ls[i+j+k+1]
      if b-a < c < b+a and a!=b!=c!=a :
        ans += 1 j range(len(ls)-i-2) range len(ls)-i-2 len(ls)-i len(ls) len ls i 2 b = ls[i+1+j] b ls[i+1+j] ls i+1+j i+1 i 1 j for k in range(len(ls)-i-j-1) :
      c = ls[i+j+k+1]
      if b-a < c < b+a and a!=b!=c!=a :
        ans += 1 k range(len(ls)-i-j-1) range len(ls)-i-j-1 len(ls)-i-j len(ls)-i len(ls) len ls i j 1 c = ls[i+j+k+1] c ls[i+j+k+1] ls i+j+k+1 i+j+k i+j i j k 1 if b-a < c < b+a and a!=b!=c!=a :
        ans += 1 b-a < c < b+a and a!=b!=c!=a b-a < c < b+a b-a < c b-a b a c b+a b a a!=b!=c!=a a!=b!=c a!=b a b c a ans += 1 ans 1 print(ans) print ans ans += 1 1 ans n = int(input()) int(input()) n c = ls[i+j+k+1] ls[i+j+k+1] c a = ls[i] ls[i] a ls = sorted(list(map(int,input().split()))) sorted(list(map(int,input().split()))) ls b = ls[i+1+j] ls[i+1+j] b ans = 0 0 ans
n = int(input())
ls = sorted(list(map(int,input().split())))

ans = 0
for i in range(len(ls)-2) :
  a = ls[i]
  for j in range(len(ls)-i-2) :
    b = ls[i+1+j]
    for k in range(len(ls)-i-j-1) :
      c = ls[i+j+k+1]
      if b-a < c < b+a and a!=b!=c!=a :
        ans += 1
print(ans)