#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
	while(true){
	vector<int>x1,x2;
	int N;
	scanf("%d",&N);
	if(N==0)return 0;
	bool f[200];
	for(int i=0;i<2*N;i++)f[i]=false;
	int X;
	for(int i=0;i<N;i++){
		scanf("%d",&X);
		f[X-1]=true;
	}
	for(int i=0;i<2*N;i++){
		if(f[i])x1.push_back(i);
		else x2.push_back(i);
	}
	int ba=-1;
	//１なら太郎、2なら花子
	int zyu=1;
	sort(x1.begin(),x1.end());
	sort(x2.begin(),x2.end());
	while(x1.size()>0&&x2.size()>0){
		if(zyu==1){
			for(int i=0;i<x1.size();i++){
				if(ba<x1[i]){
					ba=x1[i];
					zyu=2;
					for(int j=i;j<x1.size()-1;j++)x1[j]=x1[j+1];
					x1.erase(x1.end()-1);
					goto a1;
				}
			}
			ba=-1;
			zyu=2;
			a1:;
		}
		else{
			for(int i=0;i<x2.size();i++){
				if(ba<x2[i]){
					ba=x2[i];
					zyu=1;
					for(int j=i;j<x2.size()-1;j++)x2[j]=x2[j+1];
					x2.erase(x2.end()-1);
					goto a2;
				}
			}
			ba=-1;
			zyu=1;
			a2:;
		}
	}
	printf("%d\n%d\n",x2.size(),x1.size());
	}
	return 0;
}