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

int main() {
  int n,in;
  while(cin>>n, n) {
    set<int> taro,hanako;
    for(int i=0; i<n; ++i) {
      cin>>in;
      taro.insert(in);
    }


    for(int i=1; i<=2*n; ++i) {
      if(taro.find(i) == taro.end()) {
	hanako.insert(i);
      }
    }

    int state = 0;
    set<int>::iterator it;
    while(!(hanako.empty() || taro.empty())) {
      it = lower_bound(taro.begin(), taro.end(), state);
      if(it == taro.end()) {
	state = 0;
      } else {
	state = *it;
	taro.erase(it);
      }
      if(taro.empty()) break;

      it = lower_bound(hanako.begin(), hanako.end(), state);
      if(it == hanako.end()) {
	state = 0;
      } else {
	state = *it;
	hanako.erase(it);
      }
    }

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