The sequence consists of different natural numbers and ends with the number 0. Determine the value of the second largest element in this sequence.

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).