from itertools import combinations
n = int(input())
l = list(map(int, input().split()))
comb = list(combinations(range(n), 3))
ans = 0
for i,j,k in comb:
    a = l[i]
    b = l[j]
    c = l[k]

    if a == b:
        continue
    if b == c:
        continue
    if c == a:
        continue
    if sum([a,b,c]) <= 2 * max(a,b,c):
        continue
    ans += 1
print(ans) from itertools import combinations 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 comb = list(combinations(range(n), 3)) comb list(combinations(range(n), 3)) list combinations(range(n), 3) combinations range(n) range n 3 ans = 0 ans 0 for i,j,k in comb:
    a = l[i]
    b = l[j]
    c = l[k]

    if a == b:
        continue
    if b == c:
        continue
    if c == a:
        continue
    if sum([a,b,c]) <= 2 * max(a,b,c):
        continue
    ans += 1 i j k comb a = l[i] a l[i] l i b = l[j] b l[j] l j c = l[k] c l[k] l k if a == b:
        continue
     a == b a b continue if b == c:
        continue
     b == c b c continue if c == a:
        continue
     c == a c a continue if sum([a,b,c]) <= 2 * max(a,b,c):
        continue
     sum([a,b,c]) <= 2 * max(a,b,c) sum([a,b,c]) sum [a,b,c] a b c 2 * max(a,b,c) 2 max(a,b,c) max a b c continue ans += 1 ans 1 print(ans) print ans n = int(input()) int(input()) n c = l[k] l[k] c ans = 0 0 ans l = list(map(int, input().split())) list(map(int, input().split())) l a = l[i] l[i] a b = l[j] l[j] b comb = list(combinations(range(n), 3)) list(combinations(range(n), 3)) comb ans += 1 1 ans
from itertools import combinations
n = int(input())
l = list(map(int, input().split()))
comb = list(combinations(range(n), 3))
ans = 0
for i,j,k in comb:
    a = l[i]
    b = l[j]
    c = l[k]

    if a == b:
        continue
    if b == c:
        continue
    if c == a:
        continue
    if sum([a,b,c]) <= 2 * max(a,b,c):
        continue
    ans += 1
print(ans)
