#include <cstdlib>
#include <iostream>
#include <set>
using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	for(int n; cin >> n, n;) {
		set<int> cards[2];
		for(int i = 1; i <= 2 * n; ++i)
			cards[1].insert(i);

		for(int i = 0; i < n; ++i) {
			int card;
			cin >> card;
			cards[0].insert(card);
			cards[1].erase(cards[1].find(card));
		}

		int turn = 0;
		int field = 0;
		while(true) {
			set<int>::iterator it = cards[turn].upper_bound(field);
			if(it == cards[turn].end())
				field = 0;

			else {
				field = *it;
				cards[turn].erase(it);
				if(cards[turn].size() == 0)
					break;
			}

			turn ^= 1;
		}

		cout << cards[1].size() << "\n" << cards[0].size() << endl;
	}


	return EXIT_SUCCESS;
}