#include <iostream>
#include <iomanip>
#include <queue>
#include <vector>
#include <algorithm>

using std::vector;
using std::greater;
using std::less;

class RunningMedian
{
private:
    std::priority_queue<int> max_heap;
    std::priority_queue<int, vector<int>, greater<int>> min_heap;
    
public:
    void push(int value)
    {
        // adding the number into the proper heap
        if(max_heap.empty())
	       max_heap.push(value);
        else{
	       if(value >= max_heap.top())
	           max_heap.push(value);
	       else
	           min_heap.push(value);
        }
        // balancing heaps
        if (max_heap.size() - min_heap.size() == 2)
        {
            min_heap.push(max_heap.top());
            max_heap.pop();
        }
        else if (min_heap.size() - max_heap.size() == 2)
        {
            max_heap.push(min_heap.top());
            min_heap.pop();
        }
    }
    
    double median()
    {
        if (max_heap.size() == min_heap.size())
            return (max_heap.top() + min_heap.top()) / 2.0;
        else if (max_heap.size() > min_heap.size())
            return max_heap.top();
        else
            return min_heap.top();
    }
};

int main(){
    RunningMedian solver;
	int n, value;
    
    std::cin >> n;
    for(int i = 0; i < n; i++)
    {
        std::cin >> value;
        solver.push(value);
        std::cout << std::fixed << std::setprecision(2) << solver.median() << std::endl;
    }
	return 0;
}