#include <iostream>
#include <set>

using namespace std;

int main()
{
	int n;
	while(cin >> n, n)
	{
		set<int> t[2];
		for(int i = 0; i < n; i++)
		{
			int x;
			cin >> x;
			t[0].insert(x);
		}
		for(int i = 1, j = 0; i <= 2 * n; i++)
		{
			if(t[0].find(i) == t[0].end())
			{
				t[1].insert(i);
			}
		}

		int turn = 0;
		int field = 0;
		while(!t[0].empty()&&!t[1].empty())
		{
			bool flag = false;
			for(set<int>::iterator it = t[turn].begin(); it != t[turn].end(); it++)
			{
				if(field > *it)
				{
					continue;
				}
				field = *it;
				t[turn].erase(it);
				flag = true;
				break;
			}
			turn = 1 - turn;
			if(!flag)
			{
				field = 0;
			}
		}
		cout << t[1].size() << endl << t[0].size() << endl;
	}
}