Given an array of integers, , compute the number of unique ways to satisfy the equation , where and . To be unique, each counted equation after being filled in must never have been counted before.
The first line will contain a single integer , .
The next line will contain space separated integers, describing the array.
The output will contain a single line, the number of unique triples that can be formed by the array.
4 1 5 3 2
Explanation for Sample
The unique equations are and