Given a sequence of natural numbers ending with the number 0. Determine the maximum length of a monotone fragment of the sequence (that is, such a fragment where all elements are either greater than the previous one or less).

Input
A sequence of natural numbers is entered, ending with the number 0 (the number 0 itself is not included in the sequence, but serves as a sign of its termination).