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

count = 0

for k in range(N):
    for j in range(N):
        for i in range(N):
            if i>=j or j>=k:
                continue
            l = sorted([L[i], L[j], L[k]])
            if l[0] == l[1] or l[1] == l[2]:
                continue
            if l[2] < l[0] + l[1]:
                count += 1


print(count) 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 count = 0 count 0 for k in range(N):
    for j in range(N):
        for i in range(N):
            if i>=j or j>=k:
                continue
            l = sorted([L[i], L[j], L[k]])
            if l[0] == l[1] or l[1] == l[2]:
                continue
            if l[2] < l[0] + l[1]:
                count += 1 k range(N) range N for j in range(N):
        for i in range(N):
            if i>=j or j>=k:
                continue
            l = sorted([L[i], L[j], L[k]])
            if l[0] == l[1] or l[1] == l[2]:
                continue
            if l[2] < l[0] + l[1]:
                count += 1 j range(N) range N for i in range(N):
            if i>=j or j>=k:
                continue
            l = sorted([L[i], L[j], L[k]])
            if l[0] == l[1] or l[1] == l[2]:
                continue
            if l[2] < l[0] + l[1]:
                count += 1 i range(N) range N if i>=j or j>=k:
                continue
             i>=j or j>=k i>=j i j j>=k j k continue l = sorted([L[i], L[j], L[k]]) l 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 l[0] == l[1] or l[1] == l[2]:
                continue
             l[0] == l[1] or l[1] == l[2] l[0] == l[1] l[0] l 0 l[1] l 1 l[1] == l[2] l[1] l 1 l[2] l 2 continue if l[2] < l[0] + l[1]:
                count += 1 l[2] < l[0] + l[1] l[2] l 2 l[0] + l[1] l[0] l 0 l[1] l 1 count += 1 count 1 print(count) print count N = int(input()) int(input()) N count = 0 0 count l = sorted([L[i], L[j], L[k]]) sorted([L[i], L[j], L[k]]) l count += 1 1 count L = list(map(int, input().split())) list(map(int, input().split())) L
N = int(input())
L = list(map(int, input().split()))

count = 0

for k in range(N):
    for j in range(N):
        for i in range(N):
            if i>=j or j>=k:
                continue
            l = sorted([L[i], L[j], L[k]])
            if l[0] == l[1] or l[1] == l[2]:
                continue
            if l[2] < l[0] + l[1]:
                count += 1


print(count)