# coding: utf-8

num = int(input())
count = 0
str = input().split()
table = [int(i) for i in str]
#全探索
for j in range(num): #ループ1
    for k in range(j+1, num): #ループ2
        for l in range(k+1, num): #ループ3
            if table[j] != table[k] and table[k] != table[l] and table[j] != table[l]:
                len = table[j] + table[k] + table[l] #周の長さ
                ma = max(table[j], max(table[k], table[l])) #一番長い辺
                rest = len - ma #残りの2辺の合計
                if ma < rest: #最大の辺が残り2辺より小さければ三角形は成立する
                    count += 1
print(count) num = int(input()) num int(input()) int input() input count = 0 count 0 str = input().split() str input().split() ().split () input split int(i) for i in str for i in str i str for i in str int(i) int i table = [int(i) for i in str] table [int(i) for i in str] for j in range(num): #ループ1
    for k in range(j+1, num): #ループ2
        for l in range(k+1, num): #ループ3
            if table[j] != table[k] and table[k] != table[l] and table[j] != table[l]:
                len = table[j] + table[k] + table[l] #周の長さ
                ma = max(table[j], max(table[k], table[l])) #一番長い辺
                rest = len - ma #残りの2辺の合計
                if ma < rest: #最大の辺が残り2辺より小さければ三角形は成立する
                    count += 1 j range(num) range num for k in range(j+1, num): #ループ2
        for l in range(k+1, num): #ループ3
            if table[j] != table[k] and table[k] != table[l] and table[j] != table[l]:
                len = table[j] + table[k] + table[l] #周の長さ
                ma = max(table[j], max(table[k], table[l])) #一番長い辺
                rest = len - ma #残りの2辺の合計
                if ma < rest: #最大の辺が残り2辺より小さければ三角形は成立する
                    count += 1 k range(j+1, num) range j+1 j 1 num for l in range(k+1, num): #ループ3
            if table[j] != table[k] and table[k] != table[l] and table[j] != table[l]:
                len = table[j] + table[k] + table[l] #周の長さ
                ma = max(table[j], max(table[k], table[l])) #一番長い辺
                rest = len - ma #残りの2辺の合計
                if ma < rest: #最大の辺が残り2辺より小さければ三角形は成立する
                    count += 1 l range(k+1, num) range k+1 k 1 num if table[j] != table[k] and table[k] != table[l] and table[j] != table[l]:
                len = table[j] + table[k] + table[l] #周の長さ
                ma = max(table[j], max(table[k], table[l])) #一番長い辺
                rest = len - ma #残りの2辺の合計
                if ma < rest: #最大の辺が残り2辺より小さければ三角形は成立する
                    count += 1 table[j] != table[k] and table[k] != table[l] and table[j] != table[l] table[j] != table[k] and table[k] != table[l] table[j] != table[k] table[j] table j table[k] table k table[k] != table[l] table[k] table k table[l] table l table[j] != table[l] table[j] table j table[l] table l len = table[j] + table[k] + table[l] len table[j] + table[k] + table[l] table[j] + table[k] table[j] table j table[k] table k table[l] table l ma = max(table[j], max(table[k], table[l])) ma max(table[j], max(table[k], table[l])) max table[j] table j max(table[k], table[l]) max table[k] table k table[l] table l rest = len - ma rest len - ma len ma if ma < rest: #最大の辺が残り2辺より小さければ三角形は成立する
                    count += 1 ma < rest ma rest count += 1 count 1 print(count) print count ma = max(table[j], max(table[k], table[l])) max(table[j], max(table[k], table[l])) ma table = [int(i) for i in str] [int(i) for i in str] table rest = len - ma len - ma rest str = input().split() input().split() str num = int(input()) int(input()) num len = table[j] + table[k] + table[l] table[j] + table[k] + table[l] len count = 0 0 count count += 1 1 count
# coding: utf-8

num = int(input())
count = 0
str = input().split()
table = [int(i) for i in str]
#全探索
for j in range(num): #ループ1
    for k in range(j+1, num): #ループ2
        for l in range(k+1, num): #ループ3
            if table[j] != table[k] and table[k] != table[l] and table[j] != table[l]:
                len = table[j] + table[k] + table[l] #周の長さ
                ma = max(table[j], max(table[k], table[l])) #一番長い辺
                rest = len - ma #残りの2辺の合計
                if ma < rest: #最大の辺が残り2辺より小さければ三角形は成立する
                    count += 1
print(count)
