#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <math.h>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;

int n,a[100],b[100],c[201],m;

int main(){
	while(cin>>n){
		if(n==0)return 0;
		fill(c,c+200,0);
		for(int i=0;i<n;i++){
			cin>>m;
			a[i]=m;
			c[m]=1;
		}
		sort(a,a+n);
		int p=0;
		for(int i=1;i<=2*n;i++){
			if(c[i]==0)b[p++]=i;
		}
		int x=n,y=n,z=0;
		while(1){
			int f=-1;
			for(int i=0;i<n;i++)if(a[i]>z){f=i;break;}
			if(f>-1){
				z=a[f];a[f]=0;x--;
				if(x==0){cout<<y<<endl<<0<<endl;break;}
			}
			else z=0;
			f=-1;
			for(int i=0;i<n;i++)if(b[i]>z){f=i;break;}
			if(f>-1){
				z=b[f];b[f]=0;y--;
				if(y==0){cout<<0<<endl<<x<<endl;break;}
			}
			else z=0;
		}
	}
}