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

ans = 0
for i1 in range(N):
    for i2 in range(i1, N):
        for i3 in range(i2, N):
            l1 = L[i1]
            l2 = L[i2]
            l3 = L[i3]
            if l1 != l2 and l2 != l3 and l3 != l1:
                if l1 < l2 + l3 and l2 < l3 + l1 and l3 < l1 + l2:
                    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 ans = 0 ans 0 for i1 in range(N):
    for i2 in range(i1, N):
        for i3 in range(i2, N):
            l1 = L[i1]
            l2 = L[i2]
            l3 = L[i3]
            if l1 != l2 and l2 != l3 and l3 != l1:
                if l1 < l2 + l3 and l2 < l3 + l1 and l3 < l1 + l2:
                    ans += 1 i1 range(N) range N for i2 in range(i1, N):
        for i3 in range(i2, N):
            l1 = L[i1]
            l2 = L[i2]
            l3 = L[i3]
            if l1 != l2 and l2 != l3 and l3 != l1:
                if l1 < l2 + l3 and l2 < l3 + l1 and l3 < l1 + l2:
                    ans += 1 i2 range(i1, N) range i1 N for i3 in range(i2, N):
            l1 = L[i1]
            l2 = L[i2]
            l3 = L[i3]
            if l1 != l2 and l2 != l3 and l3 != l1:
                if l1 < l2 + l3 and l2 < l3 + l1 and l3 < l1 + l2:
                    ans += 1 i3 range(i2, N) range i2 N l1 = L[i1] l1 L[i1] L i1 l2 = L[i2] l2 L[i2] L i2 l3 = L[i3] l3 L[i3] L i3 if l1 != l2 and l2 != l3 and l3 != l1:
                if l1 < l2 + l3 and l2 < l3 + l1 and l3 < l1 + l2:
                    ans += 1 l1 != l2 and l2 != l3 and l3 != l1 l1 != l2 and l2 != l3 l1 != l2 l1 l2 l2 != l3 l2 l3 l3 != l1 l3 l1 if l1 < l2 + l3 and l2 < l3 + l1 and l3 < l1 + l2:
                    ans += 1 l1 < l2 + l3 and l2 < l3 + l1 and l3 < l1 + l2 l1 < l2 + l3 and l2 < l3 + l1 l1 < l2 + l3 l1 l2 + l3 l2 l3 l2 < l3 + l1 l2 l3 + l1 l3 l1 l3 < l1 + l2 l3 l1 + l2 l1 l2 ans += 1 ans 1 print(ans) print ans N = int(input()) int(input()) N ans = 0 0 ans l2 = L[i2] L[i2] l2 ans += 1 1 ans L = list(map(int, input().split())) list(map(int, input().split())) L l3 = L[i3] L[i3] l3 l1 = L[i1] L[i1] l1
N = int(input())
L = list(map(int, input().split()))

ans = 0
for i1 in range(N):
    for i2 in range(i1, N):
        for i3 in range(i2, N):
            l1 = L[i1]
            l2 = L[i2]
            l3 = L[i3]
            if l1 != l2 and l2 != l3 and l3 != l1:
                if l1 < l2 + l3 and l2 < l3 + l1 and l3 < l1 + l2:
                    ans += 1

print(ans)
