Triangular Collection

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Call a set of positive integers triangular if it has size at least three and, for all triples of distinct integers from the set, a triangle with those three integers as side lengths can be constructed.

Given a set of positive integers, compute the number of its triangular subsets.

입력

The first line of input contains a single integer nn (1n501 \le n \le 50), which is the number of integers in the set.

Each of the the next nn lines contains a single integer xx (1x1091 \le x \le 10^9). These are the elements of the set. They are guaranteed to be distinct.

출력

Output a single integer, which is the number of triangular subsets of the given set.