N = int(input())
L = list(map(int, input().split()))

counter = 0
if N < 3:
    print(counter)
else:
    for x in range(0, N - 2):
        for y in range(x + 1, N):
            for z in range(y + 1, N):
                if L[x] != L[y] and L[x] != L[z] and L[y] != L[z]:
                    if L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x]:
                        counter += 1
    print(counter)
 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 counter = 0 counter 0 if N < 3:
    print(counter)
else:
    for x in range(0, N - 2):
        for y in range(x + 1, N):
            for z in range(y + 1, N):
                if L[x] != L[y] and L[x] != L[z] and L[y] != L[z]:
                    if L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x]:
                        counter += 1
    print(counter) N < 3 N 3 print(counter) print counter for x in range(0, N - 2):
        for y in range(x + 1, N):
            for z in range(y + 1, N):
                if L[x] != L[y] and L[x] != L[z] and L[y] != L[z]:
                    if L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x]:
                        counter += 1
     x range(0, N - 2) range 0 N - 2 N 2 for y in range(x + 1, N):
            for z in range(y + 1, N):
                if L[x] != L[y] and L[x] != L[z] and L[y] != L[z]:
                    if L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x]:
                        counter += 1
     y range(x + 1, N) range x + 1 x 1 N for z in range(y + 1, N):
                if L[x] != L[y] and L[x] != L[z] and L[y] != L[z]:
                    if L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x]:
                        counter += 1
     z range(y + 1, N) range y + 1 y 1 N if L[x] != L[y] and L[x] != L[z] and L[y] != L[z]:
                    if L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x]:
                        counter += 1
     L[x] != L[y] and L[x] != L[z] and L[y] != L[z] L[x] != L[y] and L[x] != L[z] L[x] != L[y] L[x] L x L[y] L y L[x] != L[z] L[x] L x L[z] L z L[y] != L[z] L[y] L y L[z] L z if L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x]:
                        counter += 1
     L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x] L[x] + L[y] > L[z] and L[x] + L[z] > L[y] L[x] + L[y] > L[z] L[x] + L[y] L[x] L x L[y] L y L[z] L z L[x] + L[z] > L[y] L[x] + L[z] L[x] L x L[z] L z L[y] L y L[y] + L[z] > L[x] L[y] + L[z] L[y] L y L[z] L z L[x] L x counter += 1 counter 1 print(counter) print counter N = int(input()) int(input()) N counter += 1 1 counter counter = 0 0 counter L = list(map(int, input().split())) list(map(int, input().split())) L
N = int(input())
L = list(map(int, input().split()))

counter = 0
if N < 3:
    print(counter)
else:
    for x in range(0, N - 2):
        for y in range(x + 1, N):
            for z in range(y + 1, N):
                if L[x] != L[y] and L[x] != L[z] and L[y] != L[z]:
                    if L[x] + L[y] > L[z] and L[x] + L[z] > L[y] and L[y] + L[z] > L[x]:
                        counter += 1
    print(counter)

