The median plays an important role in statistics. By definition, it is the value that divides a sorted array into two equal parts. In this problem, you are required to determine the median of the current set of integers.
For example, consider the sequence {1, 3, 6, 2, 7}. The number is the median, since there are exactly two numbers on each side of it: and .
If the sequence contains an even number of elements, for example {1, 3, 6, 2, 7, 8}, a single number cannot divide the array into two equal parts. In this case, the median is defined as the arithmetic mean of the two middle elements . Thus, the median is (3 + 6) / 2 = 4.5. In this problem, you should print only the integer part of the median, discarding the fractional part. For the given example, the answer would be .
Consists of a sequence of integers x~(0 \le x < 2^{31}). The total number of elements does not exceed 10^6.
For each input number, print the median of the current sequence on a separate line. For each median value, print only its integer part.
Пример 1