The sequence consists of natural numbers and ends with the number 0. Determine how many elements of this sequence are greater than the previous element.
Input
A sequence of natural numbers is entered (one number per line), ending with the number 0 (the number 0 itself is not included in the sequence, but serves as a sign of its end).
Imprint
Print the answer to the problem.
Examples
# |
Input |
Output |
1 |
2
3
5
0 |
2 |
Запрещенные операторы:list;[