import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;

public class Sample133 {
	private final int count;
	private final SortedSet<Integer> tarouCardList_ = new TreeSet<Integer>();

	public Sample133(int n) {
		this.count = n;
	}

	public void add(int card) {
		tarouCardList_.add(card);
	}

	public int[] calc() {
		SortedSet<Integer> hanakoCardList = createOtherCardList(count * 2, tarouCardList_);
		int board = 0;
		for (int turn = 0; true; turn++) {
			SortedSet<Integer> cardList = (turn % 2 == 0)? tarouCardList_: hanakoCardList;

			SortedSet<Integer> tailSet = cardList.tailSet(board);
			if (tailSet.isEmpty()) {
				board = 0;
				continue;
			}
			int card = tailSet.first();
			cardList.remove(card);
			board = card;

			if (cardList.isEmpty()) break;
		}

		return new int[] {hanakoCardList.size(), tarouCardList_.size()};
	}
	private SortedSet<Integer> createOtherCardList(int max, Set<Integer> list) {
		SortedSet<Integer> result = new TreeSet<Integer>();
		for (int card = 1; card <= max; card++) {
			if (!list.contains(card)) {
				result.add(card);
			}
		}
		return result;
	}


	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try {
			final int n = Integer.parseInt(reader.readLine());
			Sample133 sample = new Sample133(n);
			for (int index = 0; index < n; index++) {
				sample.add(Integer.parseInt(reader.readLine()));
			}
			int[] result = sample.calc();
			for (int i: result) {
				System.out.println(i);
			}
		} catch (IOException ex) {
			ex.printStackTrace();
		}
	}
}
