#include <iostream>
#include <algorithm>

using namespace std;

int main(int argc, char **argv)
{
	int *t, *h, n, tmp, p, q, i, j, l;
	
	while(1){
		cin >> n;
		if(n == 0){
			break;
		} else if(n == 1){
			cout << n << endl << "0" << endl;
			cin >> n;
			cin >> n;
			continue;
		}
		t = (int *)calloc(n, sizeof(int));
		h = (int *)calloc(n, sizeof(int));
		
		for(i=0; i < n; i++){
			cin >> tmp;
			t[i] = tmp;
		}
		
		sort(t, t+n);
		for(i=1, p=0, q=0; i <= 2*n; i++){
			if(t[q] == i){
				q++;
			} else {
				h[p] = i;
				p++;
			}
		}
		
		tmp = i = j = l = 0;
		while(p*q > 0){
			if(l == 0){
				l = 1;
				while(t[i] <= tmp && i < n){
					i++;
				}
				if(i < n){
					p--;
					tmp = t[i];
					t[i] = 0;
				}
			} else {
				l = 0;
				while(h[j] <= tmp && j < n){
					j++;
				}
				if(j < n){
					q--;
					tmp = h[j];
					h[j] = 0;
				}
			}
			if(i == n || j == n){
				tmp = i = j = 0;
			}
		}
		cout << q << endl << p << endl;

		free(t);
		free(h);
	}
	
	return 0;
}