N = int(input())
L = sorted(map(int,input().split()))

cnt = 0

for i in range(N-2):
    a = L[i]
    
    for j in range(i+1,N-1):
        b = L[j]
        if a != b:
            
            for k in range(j+1,N):
                c = L[k]
                if b != c & c != a:
                    if a + b > c:
                        cnt += 1
print(cnt) N = int(input()) N int(input()) int input() input L = sorted(map(int,input().split())) L sorted(map(int,input().split())) sorted map(int,input().split()) map int input().split() ().split () input split cnt = 0 cnt 0 for i in range(N-2):
    a = L[i]
    
    for j in range(i+1,N-1):
        b = L[j]
        if a != b:
            
            for k in range(j+1,N):
                c = L[k]
                if b != c & c != a:
                    if a + b > c:
                        cnt += 1 i range(N-2) range N-2 N 2 a = L[i] a L[i] L i for j in range(i+1,N-1):
        b = L[j]
        if a != b:
            
            for k in range(j+1,N):
                c = L[k]
                if b != c & c != a:
                    if a + b > c:
                        cnt += 1 j range(i+1,N-1) range i+1 i 1 N-1 N 1 b = L[j] b L[j] L j if a != b:
            
            for k in range(j+1,N):
                c = L[k]
                if b != c & c != a:
                    if a + b > c:
                        cnt += 1 a != b a b for k in range(j+1,N):
                c = L[k]
                if b != c & c != a:
                    if a + b > c:
                        cnt += 1 k range(j+1,N) range j+1 j 1 N c = L[k] c L[k] L k if b != c & c != a:
                    if a + b > c:
                        cnt += 1 b != c & c != a b != c & c b c & c c c a if a + b > c:
                        cnt += 1 a + b > c a + b a b c cnt += 1 cnt 1 print(cnt) print cnt L = sorted(map(int,input().split())) sorted(map(int,input().split())) L cnt += 1 1 cnt N = int(input()) int(input()) N cnt = 0 0 cnt b = L[j] L[j] b c = L[k] L[k] c a = L[i] L[i] a
N = int(input())
L = sorted(map(int,input().split()))

cnt = 0

for i in range(N-2):
    a = L[i]
    
    for j in range(i+1,N-1):
        b = L[j]
        if a != b:
            
            for k in range(j+1,N):
                c = L[k]
                if b != c & c != a:
                    if a + b > c:
                        cnt += 1
print(cnt)