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 of the problem on the first line.
Constraints
- .
- ().
Subtasks
Samples
Sample 1
Input
3
1 2 3 7 5 10
Output
5
Sample 2
Input
4
1 2 3 4 5 6 7 8
Output
16