N = int(input())
l = list(map(int,input().split()))
ans = 0
if N < 3 :
    ans = ans
else :
    for m in range(N-2) :
        for n in range(m+1,N-1) :
            for k in range(n+1,N) :
                if len(set([l[m],l[n],l[k]])) == 3 and 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) :
                    ans += 1
                else :
                    continue
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 if N < 3 :
    ans = ans
else :
    for m in range(N-2) :
        for n in range(m+1,N-1) :
            for k in range(n+1,N) :
                if len(set([l[m],l[n],l[k]])) == 3 and 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) :
                    ans += 1
                else :
                    continue N < 3 N 3 ans = ans ans ans for m in range(N-2) :
        for n in range(m+1,N-1) :
            for k in range(n+1,N) :
                if len(set([l[m],l[n],l[k]])) == 3 and 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) :
                    ans += 1
                else :
                    continue m range(N-2) range N-2 N 2 for n in range(m+1,N-1) :
            for k in range(n+1,N) :
                if len(set([l[m],l[n],l[k]])) == 3 and 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) :
                    ans += 1
                else :
                    continue n range(m+1,N-1) range m+1 m 1 N-1 N 1 for k in range(n+1,N) :
                if len(set([l[m],l[n],l[k]])) == 3 and 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) :
                    ans += 1
                else :
                    continue k range(n+1,N) range n+1 n 1 N if len(set([l[m],l[n],l[k]])) == 3 and 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) :
                    ans += 1
                else :
                    continue len(set([l[m],l[n],l[k]])) == 3 and 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) len(set([l[m],l[n],l[k]])) == 3 len(set([l[m],l[n],l[k]])) len set([l[m],l[n],l[k]]) set [l[m],l[n],l[k]] l[m] l m l[n] l n l[k] l k 3 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) 2 * max(l[m],l[n],l[k]) 2 max(l[m],l[n],l[k]) max l[m] l m l[n] l n l[k] l k sum([l[m],l[n],l[k]]) sum [l[m],l[n],l[k]] l[m] l m l[n] l n l[k] l k ans += 1 ans 1 continue print(ans) print ans ans = 0 0 ans N = int(input()) int(input()) N l = list(map(int,input().split())) list(map(int,input().split())) l ans = ans ans ans ans += 1 1 ans
N = int(input())
l = list(map(int,input().split()))
ans = 0
if N < 3 :
    ans = ans
else :
    for m in range(N-2) :
        for n in range(m+1,N-1) :
            for k in range(n+1,N) :
                if len(set([l[m],l[n],l[k]])) == 3 and 2 * max(l[m],l[n],l[k]) < sum([l[m],l[n],l[k]]) :
                    ans += 1
                else :
                    continue
print(ans)