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

int main(){
  int n;

  while(cin>>n,n){
    vector<int> card[2];
    card[0].resize(n);
    for(int i=0;i<n;i++)cin>>card[0][i];
    sort(card[0].begin(),card[0].end());

    for(int i=1;i<=2*n;i++){
      int flg=1;
      for(int j=0;j<n&&flg;j++) if(i==card[0][j]) flg=0;
      if(flg) card[1].push_back(i);
    }
    int turn=0,num=-1;
    while(card[0].size()&&card[1].size()){
      int nx=-1;
      for(int i=0;i<card[turn].size();i++){
	if(card[turn][i]>num) {
	  nx=card[turn][i];
	  card[turn].erase(card[turn].begin()+i);
	  break;
	}	
      }
      num=nx;
      turn=!turn;
    }

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