#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
typedef vector<int> V;
typedef V::iterator VI;

int main(void)
{
	int n;
	
	while (scanf("%d", &n), n != 0){
		bool card[256] = {false};
		V player[2];
		
		for (int i = 0; i < n; i++){
			int t;
			scanf("%d", &t);
			player[0].push_back(t);
			card[t] = true;
		}
		sort(player[0].begin(), player[0].end());
		for (int i = 1; i <= 2 * n; i++){
			if (!card[i]) player[1].push_back(i);
		}/*
		for (int i = 0; i < 2; i++){
			for (int j = 0; j < player[i].size(); j++){
				printf("%d ", player[i][j]);
			}
			puts("");
		}*/
		int field = -1;
		while (!player[0].empty() && !player[1].empty()){
			for (int i = 0; i < 2; i++){
				if (field == -1){
					field = player[i][0];
					player[i].erase(player[i].begin());
				}
				else {
					VI vi = upper_bound(player[i].begin(), player[i].end(), field);
					if (vi == player[i].end()){
						field = -1;
					}
					else {
						field = *vi;
						player[i].erase(vi);
					}
				}
				//printf(" %d\n", field);
			}
		}
		printf("%u\n%u\n", player[1].size(), player[0].size());
	}
}