n = int(input())
ans = 0
s = list(map(int,input().split()))
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            a,b,c = s[i],s[j],s[k]
            if a != b!= c!= a and a+b >c and a+c >b and c+b >a:ans +=1
print(ans) n = int(input()) n int(input()) int input() input ans = 0 ans 0 s = list(map(int,input().split())) s list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            a,b,c = s[i],s[j],s[k]
            if a != b!= c!= a and a+b >c and a+c >b and c+b >a:ans +=1 i range(n) range n for j in range(i+1,n):
        for k in range(j+1,n):
            a,b,c = s[i],s[j],s[k]
            if a != b!= c!= a and a+b >c and a+c >b and c+b >a:ans +=1 j range(i+1,n) range i+1 i 1 n for k in range(j+1,n):
            a,b,c = s[i],s[j],s[k]
            if a != b!= c!= a and a+b >c and a+c >b and c+b >a:ans +=1 k range(j+1,n) range j+1 j 1 n a,b,c = s[i],s[j],s[k] a s[i] s i b s[j] s j c s[k] s k if a != b!= c!= a and a+b >c and a+c >b and c+ a != b!= c!= a and a+b >c and a+c >b and c+b >a a != b!= c!= a and a+b >c and a+c >b a != b!= c!= a and a+b >c a != b!= c!= a a != b!= c a != b a b c a a+b >c a+b a b c a+c >b a+c a c b c+b >a c+b c b a print(ans) print ans s = list(map(int,input().split())) list(map(int,input().split())) s a,b,c = s[i],s[j],s[k] s[i] a c = s[i],s[j],s[k] s[k] c ans = 0 0 ans n = int(input()) int(input()) n b,c = s[i],s[j],s[k] s[j] b
n = int(input())
ans = 0
s = list(map(int,input().split()))
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            a,b,c = s[i],s[j],s[k]
            if a != b!= c!= a and a+b >c and a+c >b and c+b >a:ans +=1
print(ans)
