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

int main() {
  int n;
  while (cin >> n, n) {
    vector<int> all(2*n);
    for (int i = 0; i < 2*n; ++i)
      all[i] = i;
    vector<int> players[2];
    for (int i = 0; i < n; ++i) {
      int c; cin >> c; --c;
      players[0].push_back(c);
    }
    sort(players[0].begin(), players[0].end());
    for (int i = 0; i < n; ++i)
      swap(all[i], all[players[0][i]]);
    players[1].assign(all.begin() + n, all.end());
    sort(players[1].begin(), players[1].end());

    int play = -1;
    for (int turn = 0; ; turn = !turn) {
      vector<int>& player = players[turn];
      auto it = lower_bound(player.begin(), player.end(), play);
      if (it == player.end()) {
        play = -1;
      } else {
        play = *it;
        player.erase(it);
        if (player.empty())
          break;
      }
    }

    cout << players[1].size() << endl << players[0].size() << endl;
  }
}