
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define pp pair<ll,ll>
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;
ll MOD=1000000007;

 
int main() {
    while(true){
    int n;
    cin >> n;
    if (n==0) break;
    vector<int> a(2*n,0);
    rep(i,n){
        int f;
        cin >> f;
        a[f-1]=1;
    }
    int t=n,tt=n,c=1;
    while(true){
        if (t==0 || tt==0) break;
        rep(i,2*n){
            if (a[i]==c){
                if (c==1) t--;
                else tt--;
                a[i]=2;
                c=1-c;
            }
            if (t==0 || tt==0) break;
        }
        c=1-c;
    }
    cout << tt << endl;
    cout << t << endl;
    }

}
