a = [input() for i in range(2)]
b = a[1].split(" ")
ans = 0

num = int(a[0])
if num>2:
  for i in range (0,num-2):
    for j in range (i+1,num-1):
      for k in range (j+1, num):
        if int(b[i])!=int(b[j]):
          if int(b[j])!=int(b[k]):
            if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1
print(ans) input() for i in range(2) for i in range(2) i range(2) range 2 for i in range(2) input() input a = [input() for i in range(2)] a [input() for i in range(2)] b = a[1].split(" ") b a[1].split(" ") [1].split [1] a 1 split " " ans = 0 ans 0 num = int(a[0]) num int(a[0]) int a[0] a 0 if num>2:
  for i in range (0,num-2):
    for j in range (i+1,num-1):
      for k in range (j+1, num):
        if int(b[i])!=int(b[j]):
          if int(b[j])!=int(b[k]):
            if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 num>2 num 2 for i in range (0,num-2):
    for j in range (i+1,num-1):
      for k in range (j+1, num):
        if int(b[i])!=int(b[j]):
          if int(b[j])!=int(b[k]):
            if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 i range (0,num-2) range 0 num-2 num 2 for j in range (i+1,num-1):
      for k in range (j+1, num):
        if int(b[i])!=int(b[j]):
          if int(b[j])!=int(b[k]):
            if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 j range (i+1,num-1) range i+1 i 1 num-1 num 1 for k in range (j+1, num):
        if int(b[i])!=int(b[j]):
          if int(b[j])!=int(b[k]):
            if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 k range (j+1, num) range j+1 j 1 num if int(b[i])!=int(b[j]):
          if int(b[j])!=int(b[k]):
            if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 int(b[i])!=int(b[j]) int(b[i]) int b[i] b i int(b[j]) int b[j] b j if int(b[j])!=int(b[k]):
            if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 int(b[j])!=int(b[k]) int(b[j]) int b[j] b j int(b[k]) int b[k] b k if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 int(b[k])!=int(b[i]) int(b[k]) int b[k] b k int(b[i]) int b[i] b i if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 int(b[i])+int(b[j])>int(b[k]) int(b[i])+int(b[j]) int(b[i]) int b[i] b i int(b[j]) int b[j] b j int(b[k]) int b[k] b k if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 int(b[j])+int(b[k])>int(b[i]) int(b[j])+int(b[k]) int(b[j]) int b[j] b j int(b[k]) int b[k] b k int(b[i]) int b[i] b i if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1 int(b[k])+int(b[i])>int(b[j]) int(b[k])+int(b[i]) int(b[k]) int b[k] b k int(b[i]) int b[i] b i int(b[j]) int b[j] b j ans=ans+1 ans ans+1 ans 1 print(ans) print ans num = int(a[0]) int(a[0]) num ans=ans+1 ans+1 ans a = [input() for i in range(2)] [input() for i in range(2)] a b = a[1].split(" ") a[1].split(" ") b ans = 0 0 ans
a = [input() for i in range(2)]
b = a[1].split(" ")
ans = 0

num = int(a[0])
if num>2:
  for i in range (0,num-2):
    for j in range (i+1,num-1):
      for k in range (j+1, num):
        if int(b[i])!=int(b[j]):
          if int(b[j])!=int(b[k]):
            if int(b[k])!=int(b[i]):
              if int(b[i])+int(b[j])>int(b[k]):
                if int(b[j])+int(b[k])>int(b[i]):
                  if int(b[k])+int(b[i])>int(b[j]):
                    ans=ans+1
print(ans)