N = int(input())

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

L.sort()

ans = 0

if N >= 3 :
    for i in range(0, N - 1) :
        for j in range(1, N - 1 - i) :
            for k in range(2, N - i):
                if L[i] < L[i+j] < L[i+k] and L[i] + L[i+j] > L[i+k]:
                    ans += 1

print(ans) 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 L.sort() L.sort L sort ans = 0 ans 0 if N >= 3 :
    for i in range(0, N - 1) :
        for j in range(1, N - 1 - i) :
            for k in range(2, N - i):
                if L[i] < L[i+j] < L[i+k] and L[i] + L[i+j] > L[i+k]:
                    ans += 1 N >= 3 N 3 for i in range(0, N - 1) :
        for j in range(1, N - 1 - i) :
            for k in range(2, N - i):
                if L[i] < L[i+j] < L[i+k] and L[i] + L[i+j] > L[i+k]:
                    ans += 1 i range(0, N - 1) range 0 N - 1 N 1 for j in range(1, N - 1 - i) :
            for k in range(2, N - i):
                if L[i] < L[i+j] < L[i+k] and L[i] + L[i+j] > L[i+k]:
                    ans += 1 j range(1, N - 1 - i) range 1 N - 1 - i N - 1 N 1 i for k in range(2, N - i):
                if L[i] < L[i+j] < L[i+k] and L[i] + L[i+j] > L[i+k]:
                    ans += 1 k range(2, N - i) range 2 N - i N i if L[i] < L[i+j] < L[i+k] and L[i] + L[i+j] > L[i+k]:
                    ans += 1 L[i] < L[i+j] < L[i+k] and L[i] + L[i+j] > L[i+k] L[i] < L[i+j] < L[i+k] L[i] < L[i+j] L[i] L i L[i+j] L i+j i j L[i+k] L i+k i k L[i] + L[i+j] > L[i+k] L[i] + L[i+j] L[i] L i L[i+j] L i+j i j L[i+k] L i+k i k ans += 1 ans 1 print(ans) print ans ans = 0 0 ans ans += 1 1 ans N = int(input()) int(input()) N L = list(map(int, input().split())) list(map(int, input().split())) L
N = int(input())

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

L.sort()

ans = 0

if N >= 3 :
    for i in range(0, N - 1) :
        for j in range(1, N - 1 - i) :
            for k in range(2, N - i):
                if L[i] < L[i+j] < L[i+k] and L[i] + L[i+j] > L[i+k]:
                    ans += 1

print(ans)