Problem: The legend of the foundation of Vectorland talks of two integers and . Centuries ago, the array king placed two markers at points and on the number line and conquered all the land in between (including the endpoints), which he declared to be Arrayland. Many years later, the vector king placed markers at points and and conquered all the land in between (including the endpoints), which he declared to be Vectorland. He did so in such a way that the land of Arrayland was completely inside (including the endpoints) the land of Vectorland.
Here denotes the absolute value of .
Now, Jose is stuck on a question of his history exam: "What are the values of and ?" Jose doesn't know the answer, but he believes he has narrowed the possible answers down to integers . Now, he wants to know the number of unordered pairs formed by two different elements from these integers such that the legend could be true if and were equal to these two values. Note that it is possible that Jose is wrong, and that no pairs could possibly make the legend true.
Input Format: The first line contains a single integer () — the number of choices.
The second line contains pairwise distinct integers () — the choices Jose is considering.
Output Format: Print a single integer number — the number of unordered pairs formed by different numbers from Jose's choices that could make the legend true.
Note: Consider the first sample. For the pair , the situation looks as follows, with the Arrayland markers at and , while the Vectorland markers are located at and :
The legend is not true in this case, because the interval is not conquered by Vectorland. For the pair the situation looks as follows, with Arrayland consisting of the interval and Vectorland consisting of the interval :
As Vectorland completely contains Arrayland, the legend is true. It can also be shown that the legend is true for the pair , for a total of two pairs.
In the second sample, the only pair is , and the situation looks as follows:
Note that even though Arrayland and Vectorland share as endpoint, we still consider Arrayland to be completely inside of Vectorland.