Given a list
Constraints
Input Specification
The first line of the input consists of two space-separated integers,
The next line contains
Output Specification
Output, on a single line, the number of valid triples.
Sample Input
Copy
4 1
1 1 2 2
Sample Output
Copy
2
Comments