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

cnt = 0
for i in range(n):
    for j in range(n):
        for k in range(n):
            if i != j and j != k and k != i and l[i] != l[j] and l[j] != l[k] and l[k] != l[i]:
                nagasa = sorted([l[i],l[j],l[k]])
                if nagasa[0] + nagasa[1] > nagasa[2]:
                    cnt += 1
print(cnt // 6) 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 cnt = 0 cnt 0 for i in range(n):
    for j in range(n):
        for k in range(n):
            if i != j and j != k and k != i and l[i] != l[j] and l[j] != l[k] and l[k] != l[i]:
                nagasa = sorted([l[i],l[j],l[k]])
                if nagasa[0] + nagasa[1] > nagasa[2]:
                    cnt += 1 i range(n) range n for j in range(n):
        for k in range(n):
            if i != j and j != k and k != i and l[i] != l[j] and l[j] != l[k] and l[k] != l[i]:
                nagasa = sorted([l[i],l[j],l[k]])
                if nagasa[0] + nagasa[1] > nagasa[2]:
                    cnt += 1 j range(n) range n for k in range(n):
            if i != j and j != k and k != i and l[i] != l[j] and l[j] != l[k] and l[k] != l[i]:
                nagasa = sorted([l[i],l[j],l[k]])
                if nagasa[0] + nagasa[1] > nagasa[2]:
                    cnt += 1 k range(n) range n if i != j and j != k and k != i and l[i] != l[j] and l[j] != l[k] and l[k] != l[i]:
                nagasa = sorted([l[i],l[j],l[k]])
                if nagasa[0] + nagasa[1] > nagasa[2]:
                    cnt += 1 i != j and j != k and k != i and l[i] != l[j] and l[j] != l[k] and l[k] != l[i] i != j and j != k and k != i and l[i] != l[j] and l[j] != l[k] i != j and j != k and k != i and l[i] != l[j] i != j and j != k and k != i i != j and j != k i != j i j j != k j k k != i k i l[i] != l[j] l[i] l i l[j] l j l[j] != l[k] l[j] l j l[k] l k l[k] != l[i] l[k] l k l[i] l i nagasa = sorted([l[i],l[j],l[k]]) nagasa sorted([l[i],l[j],l[k]]) sorted [l[i],l[j],l[k]] l[i] l i l[j] l j l[k] l k if nagasa[0] + nagasa[1] > nagasa[2]:
                    cnt += 1 nagasa[0] + nagasa[1] > nagasa[2] nagasa[0] + nagasa[1] nagasa[0] nagasa 0 nagasa[1] nagasa 1 nagasa[2] nagasa 2 cnt += 1 cnt 1 print(cnt // 6) print cnt // 6 cnt 6 cnt += 1 1 cnt nagasa = sorted([l[i],l[j],l[k]]) sorted([l[i],l[j],l[k]]) nagasa n = int(input()) int(input()) n l = list(map(int,input().split())) list(map(int,input().split())) l cnt = 0 0 cnt
n = int(input())
l = list(map(int,input().split()))

cnt = 0
for i in range(n):
    for j in range(n):
        for k in range(n):
            if i != j and j != k and k != i and l[i] != l[j] and l[j] != l[k] and l[k] != l[i]:
                nagasa = sorted([l[i],l[j],l[k]])
                if nagasa[0] + nagasa[1] > nagasa[2]:
                    cnt += 1
print(cnt // 6)