n = int(input())
a = [int(x) for x in input().split()]

result = 0

for a_i in range(n):
  for b_i in range(a_i+1, n):
    for c_i in range(b_i+1, n):
      l_a = a[a_i]
      l_b = a[b_i]
      l_c = a[c_i]
      
      if l_a == l_b or l_b == l_c or l_a == l_c:
        continue

      if l_a + l_b > l_c and l_b + l_c > l_a and l_c + l_a > l_b:
        result += 1
print(result) n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a = [int(x) for x in input().split()] a [int(x) for x in input().split()] result = 0 result 0 for a_i in range(n):
  for b_i in range(a_i+1, n):
    for c_i in range(b_i+1, n):
      l_a = a[a_i]
      l_b = a[b_i]
      l_c = a[c_i]
      
      if l_a == l_b or l_b == l_c or l_a == l_c:
        continue

      if l_a + l_b > l_c and l_b + l_c > l_a and l_c + l_a > l_b:
        result += 1 a_i range(n) range n for b_i in range(a_i+1, n):
    for c_i in range(b_i+1, n):
      l_a = a[a_i]
      l_b = a[b_i]
      l_c = a[c_i]
      
      if l_a == l_b or l_b == l_c or l_a == l_c:
        continue

      if l_a + l_b > l_c and l_b + l_c > l_a and l_c + l_a > l_b:
        result += 1 b_i range(a_i+1, n) range a_i+1 a_i 1 n for c_i in range(b_i+1, n):
      l_a = a[a_i]
      l_b = a[b_i]
      l_c = a[c_i]
      
      if l_a == l_b or l_b == l_c or l_a == l_c:
        continue

      if l_a + l_b > l_c and l_b + l_c > l_a and l_c + l_a > l_b:
        result += 1 c_i range(b_i+1, n) range b_i+1 b_i 1 n l_a = a[a_i] l_a a[a_i] a a_i l_b = a[b_i] l_b a[b_i] a b_i l_c = a[c_i] l_c a[c_i] a c_i if l_a == l_b or l_b == l_c or l_a == l_c:
        continue

       l_a == l_b or l_b == l_c or l_a == l_c l_a == l_b or l_b == l_c l_a == l_b l_a l_b l_b == l_c l_b l_c l_a == l_c l_a l_c continue if l_a + l_b > l_c and l_b + l_c > l_a and l_c + l_a > l_b:
        result += 1 l_a + l_b > l_c and l_b + l_c > l_a and l_c + l_a > l_b l_a + l_b > l_c and l_b + l_c > l_a l_a + l_b > l_c l_a + l_b l_a l_b l_c l_b + l_c > l_a l_b + l_c l_b l_c l_a l_c + l_a > l_b l_c + l_a l_c l_a l_b result += 1 result 1 print(result) print result a = [int(x) for x in input().split()] [int(x) for x in input().split()] a l_c = a[c_i] a[c_i] l_c result = 0 0 result l_b = a[b_i] a[b_i] l_b l_a = a[a_i] a[a_i] l_a n = int(input()) int(input()) n result += 1 1 result
n = int(input())
a = [int(x) for x in input().split()]

result = 0

for a_i in range(n):
  for b_i in range(a_i+1, n):
    for c_i in range(b_i+1, n):
      l_a = a[a_i]
      l_b = a[b_i]
      l_c = a[c_i]
      
      if l_a == l_b or l_b == l_c or l_a == l_c:
        continue

      if l_a + l_b > l_c and l_b + l_c > l_a and l_c + l_a > l_b:
        result += 1
print(result)