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

kosu = 0

if N <= 2:
    print(kosu)

else:
    for i in range(N - 2):
        for j in range(i + 1, N - 1):
            for k in range(j + 1, N):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

    print(kosu) N = int(input()) N int(input()) int input() input hen = list(map(int, input().split())) hen list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split kosu = 0 kosu 0 if N <= 2:
    print(kosu)

else:
    for i in range(N - 2):
        for j in range(i + 1, N - 1):
            for k in range(j + 1, N):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

    print(kosu) N <= 2 N 2 print(kosu) print kosu for i in range(N - 2):
        for j in range(i + 1, N - 1):
            for k in range(j + 1, N):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 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):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

     j range(i + 1, N - 1) range i + 1 i 1 N - 1 N 1 for k in range(j + 1, N):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

     k range(j + 1, N) range j + 1 j 1 N if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

     hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i] hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i] hen[i] != hen[j] and hen[j] != hen[k] hen[i] != hen[j] hen[i] hen i hen[j] hen j hen[j] != hen[k] hen[j] hen j hen[k] hen k hen[k] != hen[i] hen[k] hen k hen[i] hen i hen[i] + hen[j] > hen[k] hen[i] + hen[j] hen[i] hen i hen[j] hen j hen[k] hen k hen[k] + hen[i] > hen[j] hen[k] + hen[i] hen[k] hen k hen[i] hen i hen[j] hen j hen[j] + hen[k] > hen[i] hen[j] + hen[k] hen[j] hen j hen[k] hen k hen[i] hen i i < j < k i < j i j k kosu += 1 kosu 1 print(kosu) print kosu N = int(input()) int(input()) N hen = list(map(int, input().split())) list(map(int, input().split())) hen kosu = 0 0 kosu kosu += 1 1 kosu
N = int(input())
hen = list(map(int, input().split()))

kosu = 0

if N <= 2:
    print(kosu)

else:
    for i in range(N - 2):
        for j in range(i + 1, N - 1):
            for k in range(j + 1, N):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

    print(kosu)