#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>

using namespace std;

int main(void){
	int n;
	
	while(cin >> n && n){
		int hand[2*n+1]; //hana:0 taro:1
		bool used[2*n+1];
		int tmp;
		memset(hand,0,sizeof(hand));
		
		for(int i=0;i<n;i++){
			cin >> tmp;
			hand[tmp] = 1;
		}
		
		vector<int> hands[2];
		for(int i=1;i<=2*n;i++){
			if(hand[i] == 0){
				hands[0].push_back(i);
			}else{
				hands[1].push_back(i);
			}
		}
		sort(hands[0].begin(), hands[0].end());
		sort(hands[1].begin(), hands[1].end());
		
		int field = 0;
		int turn = 1; //0:hana 1:taro
		int index;
		do{
			bool canpush = false;
			for(int i=0;i<hands[turn].size();i++){
				if(field < hands[turn][i]){
					canpush = true;
					index = i;
					break;
				}
			}
			
			if(canpush == false){
				field = 0;
			}else{
				field = hands[turn][index];
				hands[turn].erase(hands[turn].begin()+index);
			}
			turn = 1 - turn;
		}while(hands[0].size() != 0 && hands[1].size() != 0);
		
		cout << hands[0].size() << endl;
		cout << hands[1].size() << endl;
	}
}