S = int(eval(input()))

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



count=0

for i in range(len(L)):

    for j in range(i+1,len(L)):

        for k in range(j+1,len(L)):

            if (L[i]!=L[j] and L[j]!=L[k]):

                if ((L[i]+L[j]>L[k]) and (L[j]+L[k]>L[i]) and ((L[k]+L[i]>L[j]))):

                    count+=1

print(count)

n=int(eval(input()))

l=list(map(int,input().split()))

l.sort()



cnt=0

for i in range(n):

    for j in range(i+1,n):

        for k in range(j+1,n):

            if (l[i]==l[j] or l[j]==l[k] or l[k]==l[i]):

                continue

            if l[k]-l[j]-l[i]<0:

                cnt+=1



print(cnt)

S = int(eval(input()))
L = sorted(list(map(int, input().split())))
count = 0
for i in range(len(L)):
    for j in range(i + 1, len(L)):
        for k in range(j + 1, len(L)):
            if L[i] != L[j] and L[j] != L[k]:
                if (
                    (L[i] + L[j] > L[k])
                    and (L[j] + L[k] > L[i])
                    and ((L[k] + L[i] > L[j]))
                ):
                    count += 1
print(count)

n = int(eval(input()))
l = list(map(int, input().split()))
l.sort()
cnt = 0
for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            if l[i] == l[j] or l[j] == l[k] or l[k] == l[i]:
                continue
            if l[k] - l[j] - l[i] < 0:
                cnt += 1
print(cnt)

-S = int(eval(input())) -L = sorted(list(map(int, input().split()))) -count = 0 -for i in range(len(L)): -    for j in range(i + 1, len(L)): -        for k in range(j + 1, len(L)): -            if L[i] != L[j] and L[j] != L[k]: -                if ( -                    (L[i] + L[j] > L[k]) -                    and (L[j] + L[k] > L[i]) -                    and ((L[k] + L[i] > L[j])) -                ): -                    count += 1 -print(count) +n = int(eval(input())) +l = list(map(int, input().split())) +l.sort() +cnt = 0 +for i in range(n): +    for j in range(i + 1, n): +        for k in range(j + 1, n): +            if l[i] == l[j] or l[j] == l[k] or l[k] == l[i]: +                continue +            if l[k] - l[j] - l[i] < 0: +                cnt += 1 +print(cnt)