n = int(input())
l = [int(i) for i in input().split()]
cnt = 0
for i in range(n-2):
  l1 = l[i]
  for j in range(i+1, n-1):
    l2 = l[j]
    for g in range(j+1, n):
      l3 = l[g]
      l1_, l2_, l3_ = sorted([l1, l2, l3])
      if l1_ == l2_ or l2_ == l3_:
        continue
      if l3_ < l2_ + l1_:
        cnt += 1
        #print(i+1, j+1, g+1, l3_, l2_, l1_)
print(cnt) n = int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i l = [int(i) for i in input().split()] l [int(i) for i in input().split()] cnt = 0 cnt 0 for i in range(n-2):
  l1 = l[i]
  for j in range(i+1, n-1):
    l2 = l[j]
    for g in range(j+1, n):
      l3 = l[g]
      l1_, l2_, l3_ = sorted([l1, l2, l3])
      if l1_ == l2_ or l2_ == l3_:
        continue
      if l3_ < l2_ + l1_:
        cnt += 1
        #print(i+1, j+1, g+1, l3_, l2_, l1_) i range(n-2) range n-2 n 2 l1 = l[i] l1 l[i] l i for j in range(i+1, n-1):
    l2 = l[j]
    for g in range(j+1, n):
      l3 = l[g]
      l1_, l2_, l3_ = sorted([l1, l2, l3])
      if l1_ == l2_ or l2_ == l3_:
        continue
      if l3_ < l2_ + l1_:
        cnt += 1
        #print(i+1, j+1, g+1, l3_, l2_, l1_) j range(i+1, n-1) range i+1 i 1 n-1 n 1 l2 = l[j] l2 l[j] l j for g in range(j+1, n):
      l3 = l[g]
      l1_, l2_, l3_ = sorted([l1, l2, l3])
      if l1_ == l2_ or l2_ == l3_:
        continue
      if l3_ < l2_ + l1_:
        cnt += 1
        #print(i+1, j+1, g+1, l3_, l2_, l1_) g range(j+1, n) range j+1 j 1 n l3 = l[g] l3 l[g] l g l1_, l2_, l3_ = sorted([l1, l2, l3]) l1_ sorted([l1, l2, l3]) sorted [l1, l2, l3] l1 l2 l3 l2_ l3_ if l1_ == l2_ or l2_ == l3_:
        continue
       l1_ == l2_ or l2_ == l3_ l1_ == l2_ l1_ l2_ l2_ == l3_ l2_ l3_ continue if l3_ < l2_ + l1_:
        cnt += 1
        #print(i+1, j+1, g+1, l3_, l2_, l1_) l3_ < l2_ + l1_ l3_ l2_ + l1_ l2_ l1_ cnt += 1 cnt 1 print(cnt) print cnt l3 = l[g] l[g] l3 n = int(input()) int(input()) n l = [int(i) for i in input().split()] [int(i) for i in input().split()] l l2 = l[j] l[j] l2 l1_, l2_, l3_ = sorted([l1, l2, l3]) sorted([l1, l2, l3]) l1_ cnt += 1 1 cnt cnt = 0 0 cnt l1 = l[i] l[i] l1 l3_ = sorted([l1, l2, l3]) sorted([l1, l2, l3]) l3_ l2_, l3_ = sorted([l1, l2, l3]) sorted([l1, l2, l3]) l2_
n = int(input())
l = [int(i) for i in input().split()]
cnt = 0
for i in range(n-2):
  l1 = l[i]
  for j in range(i+1, n-1):
    l2 = l[j]
    for g in range(j+1, n):
      l3 = l[g]
      l1_, l2_, l3_ = sorted([l1, l2, l3])
      if l1_ == l2_ or l2_ == l3_:
        continue
      if l3_ < l2_ + l1_:
        cnt += 1
        #print(i+1, j+1, g+1, l3_, l2_, l1_)
print(cnt)