n = int(input())
l = [int(x) for x in input().split()]
s = [0, 0, 0]
count=0

l.sort()

for i in range(len(l)):
    for j in range(len(l)):
        for k in range(len(l)):
            if i == j or j == k or k==i:
                pass
            else:
                if l[i] >= l[j] or l[j] >= l[k] or l[k] <= l[i]:
                    pass
                else:
                    s[0] = l[i]
                    s[1] = l[j]
                    s[2] = l[k]
                  
                    if s[2] < s[1] + s[0]:
                        count += 1
                    else:
                        pass

print(count) n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x l = [int(x) for x in input().split()] l [int(x) for x in input().split()] s = [0, 0, 0] s [0, 0, 0] 0 0 0 count=0 count 0 l.sort() l.sort l sort for i in range(len(l)):
    for j in range(len(l)):
        for k in range(len(l)):
            if i == j or j == k or k==i:
                pass
            else:
                if l[i] >= l[j] or l[j] >= l[k] or l[k] <= l[i]:
                    pass
                else:
                    s[0] = l[i]
                    s[1] = l[j]
                    s[2] = l[k]
                  
                    if s[2] < s[1] + s[0]:
                        count += 1
                    else:
                        pass i range(len(l)) range len(l) len l for j in range(len(l)):
        for k in range(len(l)):
            if i == j or j == k or k==i:
                pass
            else:
                if l[i] >= l[j] or l[j] >= l[k] or l[k] <= l[i]:
                    pass
                else:
                    s[0] = l[i]
                    s[1] = l[j]
                    s[2] = l[k]
                  
                    if s[2] < s[1] + s[0]:
                        count += 1
                    else:
                        pass j range(len(l)) range len(l) len l for k in range(len(l)):
            if i == j or j == k or k==i:
                pass
            else:
                if l[i] >= l[j] or l[j] >= l[k] or l[k] <= l[i]:
                    pass
                else:
                    s[0] = l[i]
                    s[1] = l[j]
                    s[2] = l[k]
                  
                    if s[2] < s[1] + s[0]:
                        count += 1
                    else:
                        pass k range(len(l)) range len(l) len l if i == j or j == k or k==i:
                pass
            else:
                if l[i] >= l[j] or l[j] >= l[k] or l[k] <= l[i]:
                    pass
                else:
                    s[0] = l[i]
                    s[1] = l[j]
                    s[2] = l[k]
                  
                    if s[2] < s[1] + s[0]:
                        count += 1
                    else:
                        pass i == j or j == k or k==i i == j or j == k i == j i j j == k j k k==i k i if l[i] >= l[j] or l[j] >= l[k] or l[k] <= l[i]:
                    pass
                else:
                    s[0] = l[i]
                    s[1] = l[j]
                    s[2] = l[k]
                  
                    if s[2] < s[1] + s[0]:
                        count += 1
                    else:
                        pass l[i] >= l[j] or l[j] >= l[k] or l[k] <= l[i] l[i] >= l[j] or l[j] >= l[k] l[i] >= l[j] l[i] l i l[j] l j l[j] >= l[k] l[j] l j l[k] l k l[k] <= l[i] l[k] l k l[i] l i s[0] = l[i] s[0] s 0 l[i] l i s[1] = l[j] s[1] s 1 l[j] l j s[2] = l[k] s[2] s 2 l[k] l k if s[2] < s[1] + s[0]:
                        count += 1
                    else:
                        pass s[2] < s[1] + s[0] s[2] s 2 s[1] + s[0] s[1] s 1 s[0] s 0 count += 1 count 1 print(count) print count count=0 0 count n = int(input()) int(input()) n s = [0, 0, 0] [0, 0, 0] s l = [int(x) for x in input().split()] [int(x) for x in input().split()] l count += 1 1 count
n = int(input())
l = [int(x) for x in input().split()]
s = [0, 0, 0]
count=0

l.sort()

for i in range(len(l)):
    for j in range(len(l)):
        for k in range(len(l)):
            if i == j or j == k or k==i:
                pass
            else:
                if l[i] >= l[j] or l[j] >= l[k] or l[k] <= l[i]:
                    pass
                else:
                    s[0] = l[i]
                    s[1] = l[j]
                    s[2] = l[k]
                  
                    if s[2] < s[1] + s[0]:
                        count += 1
                    else:
                        pass

print(count)