sticks=int(input())
lengths=input()
new_list=lengths.split()
list=[]
for item in new_list:
    list.append(int(item))
i=len(list)-1
j=i-1
k=i-2
count=0
empty=[]
while i>=2:
    while j>=1:
        while k>=0:
            if list[i]!=list[j]and list[i]!=list[k]and list[j]!=list[k]:
                empty.append((list[i],list[j],list[k]))
            k=k-1
        j=j-1
        k=j-1
    i=i-1
    j=i-1
    k=j-1
for items in empty:
    if items[0]+items[1]>items[2]and items[1]+items[2]>items[0]and items[2]+items[0]>items[1]:
        count=count+1
print(count) sticks=int(input()) sticks int(input()) int input() input lengths=input() lengths input() input new_list=lengths.split() new_list lengths.split() lengths.split lengths split list=[] list [] for item in new_list:
    list.append(int(item)) item new_list list.append(int(item)) list.append list append int(item) int item i=len(list)-1 i len(list)-1 len(list) len list 1 j=i-1 j i-1 i 1 k=i-2 k i-2 i 2 count=0 count 0 empty=[] empty [] while i>=2:
    while j>=1:
        while k>=0:
            if list[i]!=list[j]and list[i]!=list[k]and list[j]!=list[k]:
                empty.append((list[i],list[j],list[k]))
            k=k-1
        j=j-1
        k=j-1
    i=i-1
    j=i-1
    k=j-1 i>=2 i 2 while j>=1:
        while k>=0:
            if list[i]!=list[j]and list[i]!=list[k]and list[j]!=list[k]:
                empty.append((list[i],list[j],list[k]))
            k=k-1
        j=j-1
        k=j-1
     j>=1 j 1 while k>=0:
            if list[i]!=list[j]and list[i]!=list[k]and list[j]!=list[k]:
                empty.append((list[i],list[j],list[k]))
            k=k-1
         k>=0 k 0 if list[i]!=list[j]and list[i]!=list[k]and list[j]!=list[k]:
                empty.append((list[i],list[j],list[k]))
             list[i]!=list[j]and list[i]!=list[k]and list[j]!=list[k] list[i]!=list[j]and list[i]!=list[k] list[i]!=list[j] list[i] list i list[j] list j list[i]!=list[k] list[i] list i list[k] list k list[j]!=list[k] list[j] list j list[k] list k empty.append((list[i],list[j],list[k])) empty.append empty append (list[i],list[j],list[k]) list[i] list i list[j] list j list[k] list k k=k-1 k k-1 k 1 j=j-1 j j-1 j 1 k=j-1 k j-1 j 1 i=i-1 i i-1 i 1 j=i-1 j i-1 i 1 k=j-1 k j-1 j 1 for items in empty:
    if items[0]+items[1]>items[2]and items[1]+items[2]>items[0]and items[2]+items[0]>items[1]:
        count=count+1 items empty if items[0]+items[1]>items[2]and items[1]+items[2]>items[0]and items[2]+items[0]>items[1]:
        count=count+1 items[0]+items[1]>items[2]and items[1]+items[2]>items[0]and items[2]+items[0]>items[1] items[0]+items[1]>items[2]and items[1]+items[2]>items[0] items[0]+items[1]>items[2] items[0]+items[1] items[0] items 0 items[1] items 1 items[2] items 2 items[1]+items[2]>items[0] items[1]+items[2] items[1] items 1 items[2] items 2 items[0] items 0 items[2]+items[0]>items[1] items[2]+items[0] items[2] items 2 items[0] items 0 items[1] items 1 count=count+1 count count+1 count 1 print(count) print count empty=[] [] empty i=i-1 i-1 i k=j-1 j-1 k lengths=input() input() lengths k=j-1 j-1 k new_list=lengths.split() lengths.split() new_list k=i-2 i-2 k j=i-1 i-1 j j=i-1 i-1 j count=count+1 count+1 count j=j-1 j-1 j i=len(list)-1 len(list)-1 i k=k-1 k-1 k sticks=int(input()) int(input()) sticks list=[] [] list count=0 0 count
sticks=int(input())
lengths=input()
new_list=lengths.split()
list=[]
for item in new_list:
    list.append(int(item))
i=len(list)-1
j=i-1
k=i-2
count=0
empty=[]
while i>=2:
    while j>=1:
        while k>=0:
            if list[i]!=list[j]and list[i]!=list[k]and list[j]!=list[k]:
                empty.append((list[i],list[j],list[k]))
            k=k-1
        j=j-1
        k=j-1
    i=i-1
    j=i-1
    k=j-1
for items in empty:
    if items[0]+items[1]>items[2]and items[1]+items[2]>items[0]and items[2]+items[0]>items[1]:
        count=count+1
print(count)