# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int, input().split()))
ans = 0
for i in range(N-2):
  for j in range(i+1, N-1):
    for k in range(j+1, N):
      a = L[i]
      b = L[j]
      c = L[k]
      if a + b > c and a + c > b and b + c > a and a != b and a != c and b != c:
        ans += 1
print(ans) N = int(input()) N int(input()) int input() input L = list(map(int, input().split())) L 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(N-2):
  for j in range(i+1, N-1):
    for k in range(j+1, N):
      a = L[i]
      b = L[j]
      c = L[k]
      if a + b > c and a + c > b and b + c > a and a != b and a != c and b != c:
        ans += 1 i range(N-2) range N-2 N 2 for j in range(i+1, N-1):
    for k in range(j+1, N):
      a = L[i]
      b = L[j]
      c = L[k]
      if a + b > c and a + c > b and b + c > a and a != b and a != c and b != c:
        ans += 1 j range(i+1, N-1) range i+1 i 1 N-1 N 1 for k in range(j+1, N):
      a = L[i]
      b = L[j]
      c = L[k]
      if a + b > c and a + c > b and b + c > a and a != b and a != c and b != c:
        ans += 1 k range(j+1, N) range j+1 j 1 N a = L[i] a L[i] L i b = L[j] b L[j] L j c = L[k] c L[k] L k if a + b > c and a + c > b and b + c > a and a != b and a != c and b != c:
        ans += 1 a + b > c and a + c > b and b + c > a and a != b and a != c and b != c a + b > c and a + c > b and b + c > a and a != b and a != c a + b > c and a + c > b and b + c > a and a != b a + b > c and a + c > b and b + c > a a + b > c and a + c > b a + b > c a + b a b c a + c > b a + c a c b b + c > a b + c b c a a != b a b a != c a c b != c b c ans += 1 ans 1 print(ans) print ans ans += 1 1 ans N = int(input()) int(input()) N b = L[j] L[j] b L = list(map(int, input().split())) list(map(int, input().split())) L a = L[i] L[i] a c = L[k] L[k] c ans = 0 0 ans
# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int, input().split()))
ans = 0
for i in range(N-2):
  for j in range(i+1, N-1):
    for k in range(j+1, N):
      a = L[i]
      b = L[j]
      c = L[k]
      if a + b > c and a + c > b and b + c > a and a != b and a != c and b != c:
        ans += 1
print(ans)