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

def is_valid(a, b, c):
    valid = a != b and a != c and b != c
    is_triangle = a + b > c and b + c > a and c + a > b

    return valid and is_triangle


count = 0
for i in range(N):
    for j in range(i, N):
        for k in range(j, N):
            if is_valid(ls[i], ls[j], ls[k]):
                # print(i+1, j+1, k+1)
                count += 1

print(count) N = int(input()) N int(input()) int input() input ls = list(map(int, input().split())) ls list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def is_valid(a, b, c):
    valid = a != b and a != c and b != c
    is_triangle = a + b > c and b + c > a and c + a > b

    return valid and is_triangle is_valid valid = a != b and a != c and b != c valid a != b and a != c and b != c a != b and a != c a != b a b a != c a c b != c b c is_triangle = a + b > c and b + c > a and c + a > b is_triangle 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 return valid and is_triangle valid and is_triangle valid is_triangle a a b b c c count = 0 count 0 for i in range(N):
    for j in range(i, N):
        for k in range(j, N):
            if is_valid(ls[i], ls[j], ls[k]):
                # print(i+1, j+1, k+1)
                count += 1 i range(N) range N for j in range(i, N):
        for k in range(j, N):
            if is_valid(ls[i], ls[j], ls[k]):
                # print(i+1, j+1, k+1)
                count += 1 j range(i, N) range i N for k in range(j, N):
            if is_valid(ls[i], ls[j], ls[k]):
                # print(i+1, j+1, k+1)
                count += 1 k range(j, N) range j N if is_valid(ls[i], ls[j], ls[k]):
                # print(i+1, j+1, k+1)
                count += 1 is_valid(ls[i], ls[j], ls[k]) is_valid ls[i] ls i ls[j] ls j ls[k] ls k count += 1 count 1 print(count) print count count += 1 1 count ls = list(map(int, input().split())) list(map(int, input().split())) ls N = int(input()) int(input()) N def is_valid(a, b, c):
    valid = a != b and a != c and b != c
    is_triangle = a + b > c and b + c > a and c + a > b

    return valid and is_triangle def is_valid(a, b, c):
    valid = a != b and a != c and b != c
    is_triangle = a + b > c and b + c > a and c + a > b

    return valid and is_triangle is_valid count = 0 0 count
N = int(input())
ls = list(map(int, input().split()))

def is_valid(a, b, c):
    valid = a != b and a != c and b != c
    is_triangle = a + b > c and b + c > a and c + a > b

    return valid and is_triangle


count = 0
for i in range(N):
    for j in range(i, N):
        for k in range(j, N):
            if is_valid(ls[i], ls[j], ls[k]):
                # print(i+1, j+1, k+1)
                count += 1

print(count)
