n = int(input())
lens = list(map(int, input().split()))
lens.sort(reverse=True)

res = 0
for i in range(n - 2):
    for j in range(i + 1, n - 1):
        if lens[i] == lens[j]:
            continue
        for k in range(j + 1, n):
            if lens[i] == lens[k] or lens[j] == lens[k]:
                continue
            if lens[i] < lens[j] + lens[k]:
                res += 1

print(res) n = int(input()) n int(input()) int input() input lens = list(map(int, input().split())) lens list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split lens.sort(reverse=True) lens.sort lens sort reverse=True reverse True res = 0 res 0 for i in range(n - 2):
    for j in range(i + 1, n - 1):
        if lens[i] == lens[j]:
            continue
        for k in range(j + 1, n):
            if lens[i] == lens[k] or lens[j] == lens[k]:
                continue
            if lens[i] < lens[j] + lens[k]:
                res += 1 i range(n - 2) range n - 2 n 2 for j in range(i + 1, n - 1):
        if lens[i] == lens[j]:
            continue
        for k in range(j + 1, n):
            if lens[i] == lens[k] or lens[j] == lens[k]:
                continue
            if lens[i] < lens[j] + lens[k]:
                res += 1 j range(i + 1, n - 1) range i + 1 i 1 n - 1 n 1 if lens[i] == lens[j]:
            continue
         lens[i] == lens[j] lens[i] lens i lens[j] lens j continue for k in range(j + 1, n):
            if lens[i] == lens[k] or lens[j] == lens[k]:
                continue
            if lens[i] < lens[j] + lens[k]:
                res += 1 k range(j + 1, n) range j + 1 j 1 n if lens[i] == lens[k] or lens[j] == lens[k]:
                continue
             lens[i] == lens[k] or lens[j] == lens[k] lens[i] == lens[k] lens[i] lens i lens[k] lens k lens[j] == lens[k] lens[j] lens j lens[k] lens k continue if lens[i] < lens[j] + lens[k]:
                res += 1 lens[i] < lens[j] + lens[k] lens[i] lens i lens[j] + lens[k] lens[j] lens j lens[k] lens k res += 1 res 1 print(res) print res n = int(input()) int(input()) n res = 0 0 res lens = list(map(int, input().split())) list(map(int, input().split())) lens res += 1 1 res
n = int(input())
lens = list(map(int, input().split()))
lens.sort(reverse=True)

res = 0
for i in range(n - 2):
    for j in range(i + 1, n - 1):
        if lens[i] == lens[j]:
            continue
        for k in range(j + 1, n):
            if lens[i] == lens[k] or lens[j] == lens[k]:
                continue
            if lens[i] < lens[j] + lens[k]:
                res += 1

print(res)
