N = int(input())
L = list(map(int, input().split())) #リストで複数行作るには？

count = 0

for i in range(2, N):
    for j in range(1, i):
        for k in range(0, j):
            if L[i] == L[j] or L[j] == L[k] or L[k] == L[i]:
                continue
            elif L[k] < L[i] + L[j] and L[i] < L[j] + L[k] and L[j] < L[i] + L[k]:
                count += 1

print(count) 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 count = 0 count 0 for i in range(2, N):
    for j in range(1, i):
        for k in range(0, j):
            if L[i] == L[j] or L[j] == L[k] or L[k] == L[i]:
                continue
            elif L[k] < L[i] + L[j] and L[i] < L[j] + L[k] and L[j] < L[i] + L[k]:
                count += 1 i range(2, N) range 2 N for j in range(1, i):
        for k in range(0, j):
            if L[i] == L[j] or L[j] == L[k] or L[k] == L[i]:
                continue
            elif L[k] < L[i] + L[j] and L[i] < L[j] + L[k] and L[j] < L[i] + L[k]:
                count += 1 j range(1, i) range 1 i for k in range(0, j):
            if L[i] == L[j] or L[j] == L[k] or L[k] == L[i]:
                continue
            elif L[k] < L[i] + L[j] and L[i] < L[j] + L[k] and L[j] < L[i] + L[k]:
                count += 1 k range(0, j) range 0 j if L[i] == L[j] or L[j] == L[k] or L[k] == L[i]:
                continue
            elif L[k] < L[i] + L[j] and L[i] < L[j] + L[k] and L[j] < L[i] + L[k]:
                count += 1 L[i] == L[j] or L[j] == L[k] or L[k] == L[i] L[i] == L[j] or L[j] == L[k] L[i] == L[j] L[i] L i L[j] L j L[j] == L[k] L[j] L j L[k] L k L[k] == L[i] L[k] L k L[i] L i continue elif L[k] < L[i] + L[j] and L[i] < L[j] + L[k] and L[j] < L[i] + L[k]:
                count += 1 L[k] < L[i] + L[j] and L[i] < L[j] + L[k] and L[j] < L[i] + L[k] L[k] < L[i] + L[j] and L[i] < L[j] + L[k] L[k] < L[i] + L[j] L[k] L k L[i] + L[j] L[i] L i L[j] L j L[i] < L[j] + L[k] L[i] L i L[j] + L[k] L[j] L j L[k] L k L[j] < L[i] + L[k] L[j] L j L[i] + L[k] L[i] L i L[k] L k count += 1 count 1 print(count) print count L = list(map(int, input().split())) list(map(int, input().split())) L count += 1 1 count N = int(input()) int(input()) N count = 0 0 count
N = int(input())
L = list(map(int, input().split())) #リストで複数行作るには？

count = 0

for i in range(2, N):
    for j in range(1, i):
        for k in range(0, j):
            if L[i] == L[j] or L[j] == L[k] or L[k] == L[i]:
                continue
            elif L[k] < L[i] + L[j] and L[i] < L[j] + L[k] and L[j] < L[i] + L[k]:
                count += 1

print(count)