Find the Median - 2
Median plays an important role in the world of statistics. By definition, it is a value which divides an array into two equal parts. In this problem you are to determine the current median of some long integers.
Suppose, we have five numbers . In this case is the median as it has exactly two numbers on its each side: and .
If there are even number of values like , only one value cannot split this array into equal two parts, so we consider the average of the middle values . Thus, the median will be . In this problem, you have to print only the integer part, not the fractional. As a result, according to this problem, the median will be .
Input
Consists of series of integers and total number of integers is no more than .
Output
For each input integer print in a separate line the current value of the median. For each median value print only its integer part.