N = int(input())
L = list(map(int, input().split()))
L.sort()

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

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

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

print(cnt)
