// Arup Guha
// 11/17/2024
// Solution to 2024 SER D1/D2 Problem D: Duel of Cards

using namespace std;

#include <bits/stdc++.h>

int best(vector<int>& team1, vector<int>& team2);

int main() {

    int n;
    cin >> n;

    // Set up vector to store alice and mark used.
    vector<int> alice(n);
    vector<bool> used(2*n+1);
    for (int i=0; i<=2*n; i++) used[i] = false;

    // Read alice and sort big to small.
    for (int i=0; i<n; i++) {
        cin >> alice[i];
        used[alice[i]] = true;
    }
    sort(alice.rbegin(), alice.rend());

    // Figure out bob, big to small.
    vector<int> bob;
    for (int i=2*n; i>=1; i--)
        if (!used[i])
            bob.push_back(i);

    // Solve both ways.
    int most = best(alice, bob);
    int least = n - best(bob, alice);
    cout << least << " " << most << endl;

    return 0;
}

// Returns best outcome for team 1.
int best(vector<int>& team1, vector<int>& team2) {

    // i = team1, j = team2.
    int i=0, j=0, res = 0;

    // Sweep through.
    while (i<team1.size() && j<team2.size()) {

        // Team 1 beats this card do it.
        if (team1[i] > team2[j]) {
            res++;
            i++;
            j++;
        }

        // Skip card j for team 2 we won't beat it.
        else
            j++;
    }

    // This is team 1's best score.
    return res;
}
