N = int(input())
L = [int(i) for i in input().split()]
cnt = 0

for a in range(N-2):
  for b in range(a+1, N-1):
    for c in range(b+1, N):
        if L[a] != L[b] and L[b] != L[c] and L[c] != L[a]:
            if L[a]+L[b] > L[c] and L[b]+L[c] > L[a] and L[c]+L[a] > L[b]:
              cnt += 1
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 a in range(N-2):
  for b in range(a+1, N-1):
    for c in range(b+1, N):
        if L[a] != L[b] and L[b] != L[c] and L[c] != L[a]:
            if L[a]+L[b] > L[c] and L[b]+L[c] > L[a] and L[c]+L[a] > L[b]:
              cnt += 1 a range(N-2) range N-2 N 2 for b in range(a+1, N-1):
    for c in range(b+1, N):
        if L[a] != L[b] and L[b] != L[c] and L[c] != L[a]:
            if L[a]+L[b] > L[c] and L[b]+L[c] > L[a] and L[c]+L[a] > L[b]:
              cnt += 1 b range(a+1, N-1) range a+1 a 1 N-1 N 1 for c in range(b+1, N):
        if L[a] != L[b] and L[b] != L[c] and L[c] != L[a]:
            if L[a]+L[b] > L[c] and L[b]+L[c] > L[a] and L[c]+L[a] > L[b]:
              cnt += 1 c range(b+1, N) range b+1 b 1 N if L[a] != L[b] and L[b] != L[c] and L[c] != L[a]:
            if L[a]+L[b] > L[c] and L[b]+L[c] > L[a] and L[c]+L[a] > L[b]:
              cnt += 1 L[a] != L[b] and L[b] != L[c] and L[c] != L[a] L[a] != L[b] and L[b] != L[c] L[a] != L[b] L[a] L a L[b] L b L[b] != L[c] L[b] L b L[c] L c L[c] != L[a] L[c] L c L[a] L a if L[a]+L[b] > L[c] and L[b]+L[c] > L[a] and L[c]+L[a] > L[b]:
              cnt += 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 a L[b] L b L[c] L c L[b]+L[c] > L[a] L[b]+L[c] L[b] L b L[c] L c L[a] L a L[c]+L[a] > L[b] L[c]+L[a] L[c] L c L[a] L a L[b] L b cnt += 1 cnt 1 print(cnt) print cnt cnt += 1 1 cnt N = int(input()) int(input()) N cnt = 0 0 cnt L = [int(i) for i in input().split()] [int(i) for i in input().split()] L
N = int(input())
L = [int(i) for i in input().split()]
cnt = 0

for a in range(N-2):
  for b in range(a+1, N-1):
    for c in range(b+1, N):
        if L[a] != L[b] and L[b] != L[c] and L[c] != L[a]:
            if L[a]+L[b] > L[c] and L[b]+L[c] > L[a] and L[c]+L[a] > L[b]:
              cnt += 1
print(cnt)