A sequence of digits from to is given. The digits are provided one per line.
Your task is to read the numbers until three consecutive digits appear for the first time that form a strictly increasing sequence with step (for example: or ).
In other words, you need to detect three consecutive numbers (a, b, c) such that:
As soon as such a triple appears, the input process stops.
Each line contains one digit: (0, 1, 2, \dots, 9).
Print the number of digits read until the first occurrence of such a triple.
Example 1