n = int(input())
l = [int(v) for v in input().split()]
pairs = 0
for i in range(len(l)):
    for j in range(i + 1, len(l)):
        for k in range(j + 1, len(l)):
            a = l[i]
            b = l[j]
            c = l[k]
            if a == b or b == c or c == a:
                continue
            else:
                if a + b <= c or b + c <= a or c + a <= b:
                    continue
                else:
                    pairs += 1
print(pairs) n = int(input()) n int(input()) int input() input int(v) for v in input().split() for v in input().split() v input().split() ().split () input split for v in input().split() int(v) int v l = [int(v) for v in input().split()] l [int(v) for v in input().split()] pairs = 0 pairs 0 for i in range(len(l)):
    for j in range(i + 1, len(l)):
        for k in range(j + 1, len(l)):
            a = l[i]
            b = l[j]
            c = l[k]
            if a == b or b == c or c == a:
                continue
            else:
                if a + b <= c or b + c <= a or c + a <= b:
                    continue
                else:
                    pairs += 1 i range(len(l)) range len(l) len l for j in range(i + 1, len(l)):
        for k in range(j + 1, len(l)):
            a = l[i]
            b = l[j]
            c = l[k]
            if a == b or b == c or c == a:
                continue
            else:
                if a + b <= c or b + c <= a or c + a <= b:
                    continue
                else:
                    pairs += 1 j range(i + 1, len(l)) range i + 1 i 1 len(l) len l for k in range(j + 1, len(l)):
            a = l[i]
            b = l[j]
            c = l[k]
            if a == b or b == c or c == a:
                continue
            else:
                if a + b <= c or b + c <= a or c + a <= b:
                    continue
                else:
                    pairs += 1 k range(j + 1, len(l)) range j + 1 j 1 len(l) len l a = l[i] a l[i] l i b = l[j] b l[j] l j c = l[k] c l[k] l k if a == b or b == c or c == a:
                continue
            else:
                if a + b <= c or b + c <= a or c + a <= b:
                    continue
                else:
                    pairs += 1 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 or b + c <= a or c + a <= b:
                    continue
                else:
                    pairs += 1 a + b <= c or b + c <= a or c + a <= b a + b <= c or 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 continue pairs += 1 pairs 1 print(pairs) print pairs pairs = 0 0 pairs a = l[i] l[i] a n = int(input()) int(input()) n pairs += 1 1 pairs l = [int(v) for v in input().split()] [int(v) for v in input().split()] l c = l[k] l[k] c b = l[j] l[j] b
n = int(input())
l = [int(v) for v in input().split()]
pairs = 0
for i in range(len(l)):
    for j in range(i + 1, len(l)):
        for k in range(j + 1, len(l)):
            a = l[i]
            b = l[j]
            c = l[k]
            if a == b or b == c or c == a:
                continue
            else:
                if a + b <= c or b + c <= a or c + a <= b:
                    continue
                else:
                    pairs += 1
print(pairs)