#include <iostream>
using namespace std;

int main()
{
	int n;
	bool *taro,*hanako;
	while(cin >> n){
		if(n == 0)
			break;
		int card;
		taro = new bool[2*n+1];
		hanako = new bool[2*n+1];
		for(int i=0;i<2*n+1;i++){
			taro[i] = false;
			hanako[i] = true;
		}
		taro[0] = hanako[0] = false;

		for(int i=0;i<n;i++){
			cin >> card;
			taro[card] = true;
			hanako[card] = false;
		}

		int tn,hn;
		bool thk = true;
		tn = hn = n;
		do{
			int field = 0;
			if(thk == true)
				thk = false;
			else
				thk = true;
			for(int i=0;i<2*n+1;i++){
				if(taro[i] && i>field && !thk){
					field = i;
					taro[i] = false;
					tn--;
					thk = true;
				}else if(hanako[i] && i>field && thk){
					field = i;
					hanako[i] = false;
					hn--;
					thk = false;
				}
				if(tn == 0 || hn == 0)
					break;
			}
		}while( tn!=0 && hn!=0 );
		cout << hn <<endl;
		cout << tn <<endl;
		delete[] taro;
		delete[] hanako;
	}
	return 0;
}