/**
 * @(#)dwite3.java
 *
 *
 * @author 
 * @version 1.00 2009/10/21
 */
import java.io.*;
import java.util.Arrays;

public class dwiteThree {

public static int find(int temp[]){
	for(int i = 0; i<temp.length; i++){
			//System.out.println(i+"="+temp[i]);
			if(i+1 != temp[i]){
				return i+1;
			}
		}
		return temp.length+1;
}


public static void main(String args[]){
	int length = 0;
	int temp[] = null;
	BufferedReader in = null;
	try{
		temp = null;
		in= new BufferedReader(new InputStreamReader(new FileInputStream("DATA3.txt")));
		for(int j = 0; j<5; j++){
			length = Integer.parseInt(in.readLine());
			temp = new int[length];
			for(int i=0; i<temp.length; i++){
				temp[i] = Integer.parseInt(in.readLine());
				//System.out.println(temp[i]);
			}
			Arrays.sort(temp);
			System.out.println(find(temp));
		}
	}catch(Exception e){}
}
    
    
}
