n = int(input())
l = list(map(int,input().split()))
ans = 0
for a in range(n-2):
    for b in range(a,n-1):
        for c in range(b,n):
            if l[a]+l[b] > l[c] and l[b]+l[c] > l[a] and l[c]+l[a] > l[b]:
                if l[a] != l[b] and l[b] != l[c] and l[a] != l[c]:
                    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 a in range(n-2):
    for b in range(a,n-1):
        for c in range(b,n):
            if l[a]+l[b] > l[c] and l[b]+l[c] > l[a] and l[c]+l[a] > l[b]:
                if l[a] != l[b] and l[b] != l[c] and l[a] != l[c]:
                    ans += 1 a range(n-2) range n-2 n 2 for b in range(a,n-1):
        for c in range(b,n):
            if l[a]+l[b] > l[c] and l[b]+l[c] > l[a] and l[c]+l[a] > l[b]:
                if l[a] != l[b] and l[b] != l[c] and l[a] != l[c]:
                    ans += 1 b range(a,n-1) range a n-1 n 1 for c in range(b,n):
            if l[a]+l[b] > l[c] and l[b]+l[c] > l[a] and l[c]+l[a] > l[b]:
                if l[a] != l[b] and l[b] != l[c] and l[a] != l[c]:
                    ans += 1 c range(b,n) range b n if l[a]+l[b] > l[c] and l[b]+l[c] > l[a] and l[c]+l[a] > l[b]:
                if l[a] != l[b] and l[b] != l[c] and l[a] != l[c]:
                    ans += 1 l[a]+l[b] > l[c] and l[b]+l[c] > l[a] and l[c]+l[a] > l[b] l[a]+l[b] > l[c] and l[b]+l[c] > l[a] l[a]+l[b] > l[c] l[a]+l[b] l[a] l a l[b] l b l[c] l c l[b]+l[c] > l[a] l[b]+l[c] l[b] l b l[c] l c l[a] l a l[c]+l[a] > l[b] l[c]+l[a] l[c] l c l[a] l a l[b] l b if l[a] != l[b] and l[b] != l[c] and l[a] != l[c]:
                    ans += 1 l[a] != l[b] and l[b] != l[c] and l[a] != l[c] l[a] != l[b] and l[b] != l[c] l[a] != l[b] l[a] l a l[b] l b l[b] != l[c] l[b] l b l[c] l c l[a] != l[c] l[a] l a l[c] l c ans += 1 ans 1 print(ans) print ans ans += 1 1 ans n = int(input()) int(input()) n ans = 0 0 ans l = list(map(int,input().split())) list(map(int,input().split())) l
n = int(input())
l = list(map(int,input().split()))
ans = 0
for a in range(n-2):
    for b in range(a,n-1):
        for c in range(b,n):
            if l[a]+l[b] > l[c] and l[b]+l[c] > l[a] and l[c]+l[a] > l[b]:
                if l[a] != l[b] and l[b] != l[c] and l[a] != l[c]:
                    ans += 1
print(ans)