import itertools as it
n=int(input())
a=sorted(map(int,input().split()))
print(sum(sum(x)>2*x[2]and len(x)==len(set(x))for x in it.combinations(a,3))) import itertools as it itertools n=int(input()) n int(input()) int input() input a=sorted(map(int,input().split())) a sorted(map(int,input().split())) sorted map(int,input().split()) map int input().split() ().split () input split print(sum(sum(x)>2*x[2]and len(x)==len(set(x))for x in it.combinations(a,3))) print sum(sum(x)>2*x[2]and len(x)==len(set(x))for x in it.combinations(a,3)) sum sum(x)>2*x[2]and len(x)==len(set(x)) sum(x)>2*x[2] sum(x) sum x 2*x[2] 2 x[2] x 2 len(x)==len(set(x)) len(x) len x len(set(x)) len set(x) set x n=int(input()) int(input()) n a=sorted(map(int,input().split())) sorted(map(int,input().split())) a
import itertools as it
n=int(input())
a=sorted(map(int,input().split()))
print(sum(sum(x)>2*x[2]and len(x)==len(set(x))for x in it.combinations(a,3)))