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

count = 0
i = 0
while i < N:
    a = L_list[i]
    j = 0
    while j < i:
        b = L_list[j]
        k = 0
        while k < j:
            c = L_list[k]
            k += 1
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                count += 1
        j += 1
    i += 1
                
print(count)
 N = int(input()) N int(input()) int input() input L_list = list(map(int, input().split())) L_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split count = 0 count 0 i = 0 i 0 while i < N:
    a = L_list[i]
    j = 0
    while j < i:
        b = L_list[j]
        k = 0
        while k < j:
            c = L_list[k]
            k += 1
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                count += 1
        j += 1
    i += 1
                 i < N i N a = L_list[i] a L_list[i] L_list i j = 0 j 0 while j < i:
        b = L_list[j]
        k = 0
        while k < j:
            c = L_list[k]
            k += 1
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                count += 1
        j += 1
     j < i j i b = L_list[j] b L_list[j] L_list j k = 0 k 0 while k < j:
            c = L_list[k]
            k += 1
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                count += 1
         k < j k j c = L_list[k] c L_list[k] L_list k k += 1 k 1 if a == b or b == c or c == a:
                continue
             a == b or b == c or c == a a == b or b == c a == b a b b == c b c c == a c a continue if a + b > c and b + c > a and c + a > b:
                count += 1
         a + b > c and b + c > a and c + a > b a + b > c and b + c > a a + b > c a + b a b c b + c > a b + c b c a c + a > b c + a c a b count += 1 count 1 j += 1 j 1 i += 1 i 1 print(count) print count a = L_list[i] L_list[i] a j += 1 1 j k += 1 1 k j = 0 0 j count = 0 0 count i = 0 0 i b = L_list[j] L_list[j] b i += 1 1 i N = int(input()) int(input()) N k = 0 0 k count += 1 1 count c = L_list[k] L_list[k] c L_list = list(map(int, input().split())) list(map(int, input().split())) L_list
N = int(input())
L_list = list(map(int, input().split()))

count = 0
i = 0
while i < N:
    a = L_list[i]
    j = 0
    while j < i:
        b = L_list[j]
        k = 0
        while k < j:
            c = L_list[k]
            k += 1
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                count += 1
        j += 1
    i += 1
                
print(count)

