while true
    n = gets.to_i
    break if n == 0
    card = [[], []]
    n.times{card[0] << gets.to_i}
    card[0].sort!
    card[1] = (1..(2*n)).to_a - card[0]
    player, ba = 0, 0
    until card[0].empty? || card[1].empty?
        ba = card[player].find{|x| x > ba}
        if ba
            card[player].delete(ba)
        else
            ba = 0
        end
        player = 1 - player
    end
    puts card[1].length
    puts card[0].length
end
