n = int(input())
p = list(map(int,input().split()))
count = 0

if n <= 2:
    print(0)
else:

    for i in range(0,n-2):
        for h in range(i+1,n-1):
            for j in range(h+1,n):
                if (abs(p[i]-p[h]) < p[j] < p[i]+p[h]) and (p[i] != p[h] and p[h] != p[j] and p[j] != p[i]):

                    count += 1

    print(count) n = int(input()) n int(input()) int input() input p = list(map(int,input().split())) p list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split count = 0 count 0 if n <= 2:
    print(0)
else:

    for i in range(0,n-2):
        for h in range(i+1,n-1):
            for j in range(h+1,n):
                if (abs(p[i]-p[h]) < p[j] < p[i]+p[h]) and (p[i] != p[h] and p[h] != p[j] and p[j] != p[i]):

                    count += 1

    print(count) n <= 2 n 2 print(0) print 0 for i in range(0,n-2):
        for h in range(i+1,n-1):
            for j in range(h+1,n):
                if (abs(p[i]-p[h]) < p[j] < p[i]+p[h]) and (p[i] != p[h] and p[h] != p[j] and p[j] != p[i]):

                    count += 1

     i range(0,n-2) range 0 n-2 n 2 for h in range(i+1,n-1):
            for j in range(h+1,n):
                if (abs(p[i]-p[h]) < p[j] < p[i]+p[h]) and (p[i] != p[h] and p[h] != p[j] and p[j] != p[i]):

                    count += 1

     h range(i+1,n-1) range i+1 i 1 n-1 n 1 for j in range(h+1,n):
                if (abs(p[i]-p[h]) < p[j] < p[i]+p[h]) and (p[i] != p[h] and p[h] != p[j] and p[j] != p[i]):

                    count += 1

     j range(h+1,n) range h+1 h 1 n if (abs(p[i]-p[h]) < p[j] < p[i]+p[h]) and (p[i] != p[h] and p[h] != p[j] and p[j] != p[i]):

                    count += 1

     (abs(p[i]-p[h]) < p[j] < p[i]+p[h]) and (p[i] != p[h] and p[h] != p[j] and p[j] != p[i]) abs(p[i]-p[h]) < p[j] < p[i]+p[h] abs(p[i]-p[h]) < p[j] abs(p[i]-p[h]) abs p[i]-p[h] p[i] p i p[h] p h p[j] p j p[i]+p[h] p[i] p i p[h] p h p[i] != p[h] and p[h] != p[j] and p[j] != p[i] p[i] != p[h] and p[h] != p[j] p[i] != p[h] p[i] p i p[h] p h p[h] != p[j] p[h] p h p[j] p j p[j] != p[i] p[j] p j p[i] p i count += 1 count 1 print(count) print count p = list(map(int,input().split())) list(map(int,input().split())) p count = 0 0 count count += 1 1 count n = int(input()) int(input()) n
n = int(input())
p = list(map(int,input().split()))
count = 0

if n <= 2:
    print(0)
else:

    for i in range(0,n-2):
        for h in range(i+1,n-1):
            for j in range(h+1,n):
                if (abs(p[i]-p[h]) < p[j] < p[i]+p[h]) and (p[i] != p[h] and p[h] != p[j] and p[j] != p[i]):

                    count += 1

    print(count)
