private static int addValue(String line, PriorityQueue<Integer> lowestH, PriorityQueue<Integer> highestH) {
        int val = Integer.parseInt(line);
        long mid = highestH.isEmpty() ? Long.MIN_VALUE : highestH.peek();
        // add
        if( val > mid)
            highestH.add(val);
        else
            lowestH.add(val);
        // balance
        if(highestH.size() > lowestH.size() + 1)
            lowestH.add(highestH.poll());
        else if(highestH.size() < lowestH.size())
            highestH.add(lowestH.poll());
        // return mid
        if(highestH.size() > lowestH.size())
            return highestH.peek();
        else
            return lowestH.peek();


    }