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

L.sort(reverse = True)
i = j = k = 0
cnt = 0

while i<len(L)-2:
    j = i + 1
    while j<len(L)-1:
        k = j + 1
        if L[i] != L[j]:
            while k<len(L):
                if L[j] != L[k] and L[i] < L[j] + L[k]:
                    cnt += 1
                k += 1
        j += 1
    i += 1

print(cnt) 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 L.sort(reverse = True) L.sort L sort reverse = True reverse True i = j = k = 0 i 0 = j = k = 0 j 0 k cnt = 0 cnt 0 while i<len(L)-2:
    j = i + 1
    while j<len(L)-1:
        k = j + 1
        if L[i] != L[j]:
            while k<len(L):
                if L[j] != L[k] and L[i] < L[j] + L[k]:
                    cnt += 1
                k += 1
        j += 1
    i += 1 i<len(L)-2 i len(L)-2 len(L) len L 2 j = i + 1 j i + 1 i 1 while j<len(L)-1:
        k = j + 1
        if L[i] != L[j]:
            while k<len(L):
                if L[j] != L[k] and L[i] < L[j] + L[k]:
                    cnt += 1
                k += 1
        j += 1
     j<len(L)-1 j len(L)-1 len(L) len L 1 k = j + 1 k j + 1 j 1 if L[i] != L[j]:
            while k<len(L):
                if L[j] != L[k] and L[i] < L[j] + L[k]:
                    cnt += 1
                k += 1
         L[i] != L[j] L[i] L i L[j] L j while k<len(L):
                if L[j] != L[k] and L[i] < L[j] + L[k]:
                    cnt += 1
                k += 1
         k<len(L) k len(L) len L if L[j] != L[k] and L[i] < L[j] + L[k]:
                    cnt += 1
                 L[j] != L[k] and L[i] < L[j] + L[k] L[j] != L[k] L[j] L j L[k] L k L[i] < L[j] + L[k] L[i] L i L[j] + L[k] L[j] L j L[k] L k cnt += 1 cnt 1 k += 1 k 1 j += 1 j 1 i += 1 i 1 print(cnt) print cnt N = int(input()) int(input()) N L = list(map(int, input().split())) list(map(int, input().split())) L j = k = 0 0 j i = j = k = 0 0 i i += 1 1 i k = j + 1 j + 1 k k += 1 1 k j += 1 1 j j = i + 1 i + 1 j cnt = 0 0 cnt k = 0 0 k cnt += 1 1 cnt
N = int(input())
L = list(map(int, input().split()))

L.sort(reverse = True)
i = j = k = 0
cnt = 0

while i<len(L)-2:
    j = i + 1
    while j<len(L)-1:
        k = j + 1
        if L[i] != L[j]:
            while k<len(L):
                if L[j] != L[k] and L[i] < L[j] + L[k]:
                    cnt += 1
                k += 1
        j += 1
    i += 1

print(cnt)
