N = int(input())
L = [int(x) for x in input().split()]
cnt = 0

for i in range(len(L) - 2):
    for j in range(i+1, len(L)-1):
        for k in range(j+1, len(L)):
            a = L[i]
            b = L[j]
            c = L[k]
            p = a + b > c
            q = b + c > a
            r = c + a > b
            s = a != b
            t = b != c
            u = c != a
            if p and q and r and s and t and u:
                cnt += 1
print(cnt) N = int(input()) N int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x L = [int(x) for x in input().split()] L [int(x) for x in input().split()] cnt = 0 cnt 0 for i in range(len(L) - 2):
    for j in range(i+1, len(L)-1):
        for k in range(j+1, len(L)):
            a = L[i]
            b = L[j]
            c = L[k]
            p = a + b > c
            q = b + c > a
            r = c + a > b
            s = a != b
            t = b != c
            u = c != a
            if p and q and r and s and t and u:
                cnt += 1 i range(len(L) - 2) range len(L) - 2 len(L) len L 2 for j in range(i+1, len(L)-1):
        for k in range(j+1, len(L)):
            a = L[i]
            b = L[j]
            c = L[k]
            p = a + b > c
            q = b + c > a
            r = c + a > b
            s = a != b
            t = b != c
            u = c != a
            if p and q and r and s and t and u:
                cnt += 1 j range(i+1, len(L)-1) range i+1 i 1 len(L)-1 len(L) len L 1 for k in range(j+1, len(L)):
            a = L[i]
            b = L[j]
            c = L[k]
            p = a + b > c
            q = b + c > a
            r = c + a > b
            s = a != b
            t = b != c
            u = c != a
            if p and q and r and s and t and u:
                cnt += 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 p = a + b > c p a + b > c a + b a b c q = b + c > a q b + c > a b + c b c a r = c + a > b r c + a > b c + a c a b s = a != b s a != b a b t = b != c t b != c b c u = c != a u c != a c a if p and q and r and s and t and u:
                cnt += 1 p and q and r and s and t and u p and q and r and s and t p and q and r and s p and q and r p and q p q r s t u cnt += 1 cnt 1 print(cnt) print cnt L = [int(x) for x in input().split()] [int(x) for x in input().split()] L q = b + c > a b + c > a q p = a + b > c a + b > c p b = L[j] L[j] b r = c + a > b c + a > b r cnt = 0 0 cnt u = c != a c != a u a = L[i] L[i] a N = int(input()) int(input()) N s = a != b a != b s t = b != c b != c t c = L[k] L[k] c cnt += 1 1 cnt
N = int(input())
L = [int(x) for x in input().split()]
cnt = 0

for i in range(len(L) - 2):
    for j in range(i+1, len(L)-1):
        for k in range(j+1, len(L)):
            a = L[i]
            b = L[j]
            c = L[k]
            p = a + b > c
            q = b + c > a
            r = c + a > b
            s = a != b
            t = b != c
            u = c != a
            if p and q and r and s and t and u:
                cnt += 1
print(cnt)