n = int(input())
l = sorted(map(int,input().split()))

ans = 0

for a in range(n):
    for b in range(a+1,n):
        for c in range(b+1,n):
            if  l[a] != l[b] != l[c] and l[a]+l[b] > l[c]:
                ans += 1
print(ans) n = int(input()) n int(input()) int input() input l = sorted(map(int,input().split())) l sorted(map(int,input().split())) sorted map(int,input().split()) map int input().split() ().split () input split ans = 0 ans 0 for a in range(n):
    for b in range(a+1,n):
        for c in range(b+1,n):
            if  l[a] != l[b] != l[c] and l[a]+l[b] > l[c]:
                ans += 1 a range(n) range n for b in range(a+1,n):
        for c in range(b+1,n):
            if  l[a] != l[b] != l[c] and l[a]+l[b] > l[c]:
                ans += 1 b range(a+1,n) range a+1 a 1 n for c in range(b+1,n):
            if  l[a] != l[b] != l[c] and l[a]+l[b] > l[c]:
                ans += 1 c range(b+1,n) range b+1 b 1 n if  l[a] != l[b] != l[c] and l[a]+l[b] > l[c]:
                ans += 1 l[a] != l[b] != l[c] and l[a]+l[b] > l[c] l[a] != l[b] != l[c] l[a] != l[b] l[a] l a l[b] l b l[c] l c l[a]+l[b] > l[c] l[a]+l[b] l[a] l a l[b] l b l[c] l c ans += 1 ans 1 print(ans) print ans n = int(input()) int(input()) n ans += 1 1 ans l = sorted(map(int,input().split())) sorted(map(int,input().split())) l ans = 0 0 ans
n = int(input())
l = sorted(map(int,input().split()))

ans = 0

for a in range(n):
    for b in range(a+1,n):
        for c in range(b+1,n):
            if  l[a] != l[b] != l[c] and l[a]+l[b] > l[c]:
                ans += 1
print(ans)