loop do
  n = gets.to_i
  break if n==0
  hanako = (1..2*n).to_a
  taro = []
  n.times do
    taro << hanako.delete(gets.to_i)
  end
  taro.sort!
  field = 0
  loop do
    field =  (f=taro.find {|x|x>field}) ? taro.delete(f) : 0
      break if taro.empty?
    field =  (f=hanako.find {|x|x>field}) ? hanako.delete(f) : 0
      break if hanako.empty?
  end
  p hanako.size
  p taro.size
end