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

int main()
{
  int n;

  while (cin >> n, n){
    int card[201] = {0};
    for (int i = 0; i < n; i++){
      int x;
      cin >> x;
      card[x] = 1;
    }

    int a, b;
    bool f = false;
    a = b = n;

    while (a != 0 && b != 0){
      int fir = 0;
      f = !f;
      for (int i = 1; i <= 2 * n; i++){
        if (f && card[i] == 1 && fir < i){
          fir = i;
          a--;
          card[i] = -1;
          f = false;
          if (a == 0) break;
        }
        if (!f && card[i] == 0 && fir < i){
          fir = i;
          b--;
          card[i] = -1;
          f = true;
          if (b == 0) break;
        }
      }
    }

    int ans = 0;
    for (int i = 1; i <= 2 * n; i++){
      if (card[i] != -1) ans++;
    }

    cout << (a?0:ans) << endl << (b?0:ans) << endl;
  }
}