#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    while(cin >> n, n) {
        set<int> hand[2];
        for(int i = 0; i < n; ++i) {
            int x; cin >> x;
            hand[0].insert(x);
        }
        for(int i = 1; i <= 2 * n; ++i) {
            if(hand[0].count(i) == 0) {
                hand[1].insert(i);
            }
        }
        int field = 0;
        int turn = 0;
        while(hand[0].size() > 0 && hand[1].size() > 0) {
            auto it = hand[turn].lower_bound(field);
            if(it == hand[turn].end()) {
                field = 0;
            } else {
                field = *it;
                hand[turn].erase(it);
            }
            turn ^= 1;
        }
        cout << hand[1].size() << "\n" << hand[0].size() << endl;
    }
}
