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

cnt = 0
for i in range(n - 2):
    for j in range(i, n - 1):
        for k in range(j, n):
            a, b, c = ls[i], ls[j], ls[k]
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                cnt += 1

print(cnt) 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 cnt = 0 cnt 0 for i in range(n - 2):
    for j in range(i, n - 1):
        for k in range(j, n):
            a, b, c = ls[i], ls[j], ls[k]
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                cnt += 1 i range(n - 2) range n - 2 n 2 for j in range(i, n - 1):
        for k in range(j, n):
            a, b, c = ls[i], ls[j], ls[k]
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                cnt += 1 j range(i, n - 1) range i n - 1 n 1 for k in range(j, n):
            a, b, c = ls[i], ls[j], ls[k]
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                cnt += 1 k range(j, n) range j n a, b, c = ls[i], ls[j], ls[k] a ls[i] ls i b ls[j] ls j c ls[k] ls k 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:
                cnt += 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 cnt += 1 cnt 1 print(cnt) print cnt cnt = 0 0 cnt n = int(input()) int(input()) n c = ls[i], ls[j], ls[k] ls[k] c b, c = ls[i], ls[j], ls[k] ls[j] b ls = list(map(int, input().split())) list(map(int, input().split())) ls a, b, c = ls[i], ls[j], ls[k] ls[i] a cnt += 1 1 cnt
n = int(input())
ls = list(map(int, input().split()))

cnt = 0
for i in range(n - 2):
    for j in range(i, n - 1):
        for k in range(j, n):
            a, b, c = ls[i], ls[j], ls[k]
            if a == b or b == c or c == a:
                continue
            if a + b > c and b + c > a and c + a > b:
                cnt += 1

print(cnt)
