#include<bits/stdc++.h>
using namespace std;

int main() {

  int n;
  while( cin >> n, n ) {
    int ba;
    priority_queue<int, vector<int>, greater<int> > p[2];
    int card[201] = {0};

    for(int i=0; i<n; i++) {
      int a;
      cin >> a;
      p[0].push(a);
      card[a] = 1;
    }

    for(int i=1; i<=2*n; i++) {
      if( card[i] != 1 ) {
	p[1].push(i);
      }
    }

    int player = 1; // 0:taro / 1:hana
    int score[2] = {0}; //score[0]:taro_score / score[1]:hana_score
    ba = p[0].top(); p[0].pop();
    score[0]++;

    while( p[0].size() && p[1].size() ) { 
      vector<int> temp;
      while(1) {
	if( p[player].size() == 0 ) {
	  ba = 0;
	  break;
	}
	int drow = p[player].top(); p[player].pop();
	if( drow > ba ) {
	  ba = drow;
	  score[player] ++;
	  break;
	}
	else {
	  temp.push_back(drow);
	}
      }

      for(int i=0; i<temp.size(); i++) {
	p[player].push(temp[i]);
      }
      if( player ) player = 0;
      else player = 1;
    }
   
    cout << p[1].size() << endl << p[0].size() << endl;
  }
}