n=int(input())
llist=list(map(int,input().split()))
ans=0
for i in range(n):
    for j in range(n-i-1):
        for k in range(n-i-j-2):
            ii=llist[i]
            ji=llist[i+j+1]
            ki=llist[i+j+k+2]
            if ji != ii and ji != ki and ii != ki:
                if max(ii,ji,ki)*2 < ji+ii+ki:
                    ans+=1

print(ans) n=int(input()) n int(input()) int input() input llist=list(map(int,input().split())) llist list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans=0 ans 0 for i in range(n):
    for j in range(n-i-1):
        for k in range(n-i-j-2):
            ii=llist[i]
            ji=llist[i+j+1]
            ki=llist[i+j+k+2]
            if ji != ii and ji != ki and ii != ki:
                if max(ii,ji,ki)*2 < ji+ii+ki:
                    ans+=1 i range(n) range n for j in range(n-i-1):
        for k in range(n-i-j-2):
            ii=llist[i]
            ji=llist[i+j+1]
            ki=llist[i+j+k+2]
            if ji != ii and ji != ki and ii != ki:
                if max(ii,ji,ki)*2 < ji+ii+ki:
                    ans+=1 j range(n-i-1) range n-i-1 n-i n i 1 for k in range(n-i-j-2):
            ii=llist[i]
            ji=llist[i+j+1]
            ki=llist[i+j+k+2]
            if ji != ii and ji != ki and ii != ki:
                if max(ii,ji,ki)*2 < ji+ii+ki:
                    ans+=1 k range(n-i-j-2) range n-i-j-2 n-i-j n-i n i j 2 ii=llist[i] ii llist[i] llist i ji=llist[i+j+1] ji llist[i+j+1] llist i+j+1 i+j i j 1 ki=llist[i+j+k+2] ki llist[i+j+k+2] llist i+j+k+2 i+j+k i+j i j k 2 if ji != ii and ji != ki and ii != ki:
                if max(ii,ji,ki)*2 < ji+ii+ki:
                    ans+=1 ji != ii and ji != ki and ii != ki ji != ii and ji != ki ji != ii ji ii ji != ki ji ki ii != ki ii ki if max(ii,ji,ki)*2 < ji+ii+ki:
                    ans+=1 max(ii,ji,ki)*2 < ji+ii+ki max(ii,ji,ki)*2 max(ii,ji,ki) max ii ji ki 2 ji+ii+ki ji+ii ji ii ki ans+=1 ans 1 print(ans) print ans ki=llist[i+j+k+2] llist[i+j+k+2] ki ans+=1 1 ans n=int(input()) int(input()) n ans=0 0 ans ji=llist[i+j+1] llist[i+j+1] ji llist=list(map(int,input().split())) list(map(int,input().split())) llist ii=llist[i] llist[i] ii
n=int(input())
llist=list(map(int,input().split()))
ans=0
for i in range(n):
    for j in range(n-i-1):
        for k in range(n-i-j-2):
            ii=llist[i]
            ji=llist[i+j+1]
            ki=llist[i+j+k+2]
            if ji != ii and ji != ki and ii != ki:
                if max(ii,ji,ki)*2 < ji+ii+ki:
                    ans+=1

print(ans)