A positive integer and a sequence of length are given. Find the number of integer pairs that satisfy the following conditions.
- .
- .
Input
The input is given in the following format.
Output
Print the answer on the first line.
Constraints
- .
- ().
Subtasks
Samples
예제 1
입력
5
1 3 2 4 1
출력
2
예제 2
입력
5
1 10 9 10 1
출력
2