### main

loop do
  n = gets.strip.to_i
  break if n == 0

  n2 = 2 * n

  cards = n2.times.map{1}
  c0 = []

  n.times do
    c = gets.strip.to_i - 1
    c0 << c
    cards[c] = 0
  end

  c0.sort!
  c1 = (0...n2).select{|c| cards[c] == 1}

  nxt = 0

  while ! c0.empty? && ! c1.empty?
    ## turn 0
    while nxt < n2 && cards[nxt] != 0
      nxt += 1
    end

    if nxt < n2
      cards[nxt] = -1
      c0.delete nxt
      nxt += 1
    else
      nxt = 0
    end

    break if c0.empty?

    ## turn 1
    while nxt < n2 && cards[nxt] != 1
      nxt += 1
    end

    if nxt < n2
      cards[nxt] = -1
      c1.delete nxt
      nxt += 1
    else
      nxt = 0
    end

    break if c1.empty?
  end

  puts c1.length
  puts c0.length
end