n, *a = map(int, open(0).read().split())
print(sum(i < j < k < i + j for k in a for j in a for i in a)) n, *a = map(int, open(0).read().split()) n map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split *a a print(sum(i < j < k < i + j for k in a for j in a for i in a)) print sum(i < j < k < i + j for k in a for j in a for i in a) sum i < j < k < i + j i < j < k i < j i j k i + j i j n, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) n
n, *a = map(int, open(0).read().split())
print(sum(i < j < k < i + j for k in a for j in a for i in a))