#include <set>
#include <numeric>
#include <iostream>
#include <iterator>
#include <algorithm>
#define REP(i,n) for(int i=0; i<(int)(n); i++)

using namespace std;

int main(){
  int n;
  while(cin >> n, n){
    set<int> s[2];

    REP(i,n){ int tmp; cin >> tmp; s[0].insert(tmp); }
    REP(i,n + n) if(!s[0].count(i + 1))
      s[1].insert(i + 1);
    
    int turn = 0;
    int card = 0;
    
    while(s[0].size() && s[1].size()){
      set<int>::iterator it = lower_bound(s[turn].begin(), s[turn].end(), card + 1);
      
      if(it == s[turn].end()){
	card = 0;
      }else{
	card = *it;
	s[turn].erase(it);
      }
      
      turn = turn ^ 1;
    }
    
    cout << s[1].size() << endl;
    cout << s[0].size() << endl;
  }

  return 0;
}