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

int main() {
  int n;
  while (true) {
    cin >> n;
    if (n == 0) break;

    vector<int> taro(n); for (int i = 0; i < n; i++) cin >> taro[i];
    vector<int> card(2 * n); for (int i = 0; i < n; i++) card[taro[i] - 1]++;
    vector<int> hanako(n); int j = 0;
    for (int i = 0; i < 2 * n; i++) if (card[i] == 0) hanako[j] = i + 1, j++;
    sort(taro.begin(), taro.end());

    int turn = 0, place = 0;
    while (!taro.empty() && !hanako.empty()) {
      if (turn % 2 == 0) {
        for (int i = 0; i < taro.size(); i++) {
          if (taro[i] > place) {
            place = taro[i], taro.erase(taro.begin() + i);
            break;
          } else if (i == taro.size() - 1) place = 0;
        }
      } else {
        for (int i = 0; i < hanako.size(); i++) {
          if (hanako[i] > place) {
            place = hanako[i], hanako.erase(hanako.begin() + i);
            break;
          } else if (i == hanako.size() - 1) place = 0;
        }
      }

      turn++;
    }

    cout << hanako.size() << endl << taro.size() << endl;
  }

  return 0;
}
