#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{	
	int n;

	cin >> n;

	while (n > 0) {
		vector<int> t(n), h;

		for (int i = 0; i < n; i++)
			cin >> t[i];

		sort(t.begin(), t.end());

		int i = 0, j = 1;
		while (i < n) {
			while (t[i] > j) {
				h.push_back(j);
				j++;
			}
			j++;
			i++;
		}

		while (j <= n * 2) {
			h.push_back(j);
			j++;
		}

		int tp = 0, hp = 0;
		bool f = 1;

		while (!t.empty() && !h.empty()) {
			if (f) {
				int s = 0;

				while (s < t.size() && t[s] < hp)
					s++;

				if (s < t.size()) {
					tp = t[s];
					t.erase(t.begin() + s);

					if (t.empty())
						break;
				}
				else {
					tp = 0;
					hp = 0;
				}
				f = 0;
			}

			if (!f) {
				int u = 0;

				while (u < h.size() && h[u] < tp)
					u++;

				if (u < h.size()) {
					hp = h[u];
					h.erase(h.begin() + u);
				}
				else {
					tp = 0;
					hp = 0;
				}
				f = 1;
			}
		}

		cout << h.size() << endl << t.size() << endl;

		cin >> n;
	}

	return 0;
}
