Statement
The BCD contest has problems arranged in a fixed order. The difficulty of the problem currently at position is . Every difficulty is an integer from to , inclusive.
A participant with skill solves problems according to these rules.
- Start with the first problem and consider problems in order.
- If the current problem has difficulty at most , solve it and move to the next problem. A difficulty equal to the participant's skill is also solvable.
- Stop immediately upon reaching the first problem whose difficulty exceeds . The participant does not skip that problem or attempt any problem after it.
- If all problems have been solved, finish.
Thus, a participant solves no problems if the first problem is already too difficult, and solves all problems if every difficulty is at most their skill.
For each participant, compare the number of problems solved in the following two situations.
- Apply the rules to the problems in their current order.
- Rearrange the same problems in nondecreasing order of difficulty, then apply the rules again from the beginning.
If the two counts differ, call the participant a victim of Lunarity-style difficulty ordering. The order among problems of equal difficulty does not affect either count.
For example, suppose the difficulties are and a participant's skill is . In the current order, the participant solves the first two problems and stops at the problem of difficulty . They do not solve the later problem of difficulty . In the sorted order , they solve three problems. Therefore, the participant with skill is a victim.
There is exactly one participant with each skill . Find the number of victims of Lunarity-style difficulty ordering.
Input
The input is given in the following format.
Output
For each test case, print the number of victims of Lunarity-style difficulty ordering on its own line.
Constraints
- .
- .
- .
Subtasks
Samples
Sorting gives .
- Skill : solves problems in the original order and in sorted order, so this participant is a victim.
- Skill or : solves problems in either order.