import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author o_panda_o(emailofpanda@yahoo.com)
 */
public class Code_682B_AlyonaAndMex{
    public static void main(String[] args){
        InputStream inputStream=System.in;
        OutputStream outputStream=System.out;
        InputReader in=new InputReader(inputStream);
        OutputWriter out=new OutputWriter(outputStream);
        _682B_ solver=new _682B_();
        solver.solve(1,in,out);
        out.close();
    }

    static class _682B_{
        public void solve(int testNumber,InputReader in,OutputWriter out){
            /**
             * Date: 17th May 2017
             * Question number: 01
             * Start time: 5:46 AM
             * Submission-1: 6:03 AM(17 minutes)
             * Submission-2: 6:05 AM(19 minutes)
             */
            int n=in.nextInt();
            int array[]=in.nextSortedIntArray(n);
            int mex=1;
            if(n==1) out.print(2);
            for(int i=0;i<n;++i){
                if(array[i]>=mex) array[i]=mex;
                while(i<n && array[i]==mex) ++i;
                ++mex;
            }
            out.print(mex+1);
        }

    }

    static class InputReader{
        private InputStream stream;
        private byte[] buf=new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream){
            this.stream=stream;
        }

        public int read(){
            if(numChars==-1){
                throw new InputMismatchException();
            }
            if(curChar>=numChars){
                curChar=0;
                try{
                    numChars=stream.read(buf);
                }catch(IOException e){
                    throw new InputMismatchException();
                }
                if(numChars<=0){
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt(){
            int c=read();
            while(isSpaceChar(c)){
                c=read();
            }
            int sgn=1;
            if(c=='-'){
                sgn=-1;
                c=read();
            }
            int res=0;
            do{
                if(c<'0' || c>'9'){
                    throw new InputMismatchException();
                }
                res*=10;
                res+=c-'0';
                c=read();
            }while(!isSpaceChar(c));
            return res*sgn;
        }

        public boolean isSpaceChar(int c){
            if(filter!=null){
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c){
            return c==' ' || c=='\n' || c=='\r' || c=='\t' || c==-1;
        }

        public int[] nextIntArray(int n){
            int[] array=new int[n];
            for(int i=0;i<n;++i) array[i]=nextInt();
            return array;
        }

        public int[] nextSortedIntArray(int n){
            int array[]=nextIntArray(n);
            Arrays.sort(array);
            return array;
        }

        public interface SpaceCharFilter{
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter{
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream){
            writer=new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer){
            this.writer=new PrintWriter(writer);
        }

        public void close(){
            writer.close();
        }

        public void print(int i){
            writer.print(i);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author o_panda_o(emailofpanda@yahoo.com)
 */
public class Code_682B_AlyonaAndMex{
    public static void main(String[] args){
        InputStream inputStream=System.in;
        OutputStream outputStream=System.out;
        InputReader in=new InputReader(inputStream);
        OutputWriter out=new OutputWriter(outputStream);
        _682B_ solver=new _682B_();
        solver.solve(1,in,out);
        out.close();
    }

    static class _682B_{
        public void solve(int testNumber,InputReader in,OutputWriter out){
            int n=in.nextInt();
            int array[]=in.nextSortedIntArray(n);
            int current=0;
            int i=0;
            while(i<n){
                while(i<n && array[i]==current) ++i;
                if(i<n && array[i]>current){
                    ++current;
                    array[i]=current;
                }
            }
            out.print(current+1);
        }

    }

    static class InputReader{
        private InputStream stream;
        private byte[] buf=new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream){
            this.stream=stream;
        }

        public int read(){
            if(numChars==-1){
                throw new InputMismatchException();
            }
            if(curChar>=numChars){
                curChar=0;
                try{
                    numChars=stream.read(buf);
                }catch(IOException e){
                    throw new InputMismatchException();
                }
                if(numChars<=0){
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt(){
            int c=read();
            while(isSpaceChar(c)){
                c=read();
            }
            int sgn=1;
            if(c=='-'){
                sgn=-1;
                c=read();
            }
            int res=0;
            do{
                if(c<'0' || c>'9'){
                    throw new InputMismatchException();
                }
                res*=10;
                res+=c-'0';
                c=read();
            }while(!isSpaceChar(c));
            return res*sgn;
        }

        public boolean isSpaceChar(int c){
            if(filter!=null){
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c){
            return c==' ' || c=='\n' || c=='\r' || c=='\t' || c==-1;
        }

        public int[] nextIntArray(int n){
            int[] array=new int[n];
            for(int i=0;i<n;++i) array[i]=nextInt();
            return array;
        }

        public int[] nextSortedIntArray(int n){
            int array[]=nextIntArray(n);
            Arrays.sort(array);
            return array;
        }

        public interface SpaceCharFilter{
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter{
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream){
            writer=new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer){
            this.writer=new PrintWriter(writer);
        }

        public void close(){
            writer.close();
        }

        public void print(int i){
            writer.print(i);
        }

    }
}


/*Author LAVLESH*/
import java.util.*;
 public class solution {
			 public static void main(String[] args){
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int []a=new int[n];
		for(int i=0;i<n;i++)a[i]=in.nextInt();
		Arrays.sort(a);int j=1;
		for(int i=0;i<n;i++)
		{
			if(a[i]>=j)j++;
		}
		System.out.println(j);
	}
}


/*Author LAVLESH*/
import java.util.*;
public class solution{
	public static void main(String...args)
	{

		Scanner sc = new Scanner(System.in);
		Integer n = Integer.parseInt(sc.next());
		Integer [] arr = new Integer[n];
		int ans = 1;
		for (int i = 0; i < n; i++) {
			arr[i]=Integer.parseInt(sc.next());
		}
		Arrays.sort(arr);
		for (int i = 0; i < n; i++) {
			if(arr [i] >= ans )
				ans++;

		}

		System.out.println(ans);
	}
}


/*Author LAVLESH*/
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.Arrays;
import java.io.*;
 public class solution {
		public static void main(String[] args)throws IOException{
	 BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(br.readLine());
		int n=Integer.parseInt(st.nextToken());
		int []a=new int[n];
		for(int i=0;i<n;i++)a[i]=Integer.parseInt(st.nextToken());
		Arrays.sort(a);int j=1;
		for(int i=0;i<n;i++)
		{
			if(a[i]>=j){a[i]=j;j++;}
		}
		System.out.println(j);
	}
}


/*Author LAVLESH*/
import java.util.Arrays;
import java.util.Scanner;
 public class solution {
			 public static void main(String[] args){
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int []a=new int[n];
		for(int i=0;i<n;i++)a[i]=in.nextInt();
		Arrays.sort(a);int j=1;
		for(int i=0;i<n;i++)
		{
			if(a[i]>=j)j++;
		}
		System.out.println(j);
	}
}


import java.util.Arrays;
/*Author LAVLESH*/
import java.util.Scanner;
 public class solution {
		public static void main(String[] args){
	 Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int []a=new int[n];
		for(int i=0;i<n;i++)a[i]=in.nextInt();
		Arrays.sort(a);int j=1;
		for(int i=0;i<n;i++)
		{
			if(a[i]>=j){a[i]=j;j++;}
		}
		System.out.println(j);
	}
}


/*Author LAVLESH*/
import java.util.Scanner;
import java.util.Arrays;
import java.io.*;
 public class solution {
		public static void main(String[] args)throws IOException{
			BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
			String input[]=br.readLine().split(" ");
			int n=Integer.parseInt(input[0]);
		int []a=new int[n];
		for(int i=0;i<n;i++)a[i]=Integer.parseInt(input[i+1]);
		Arrays.sort(a);int j=1;
		for(int i=0;i<n;i++)
		{
			if(a[i]>=j){a[i]=j;j++;}
		}
		System.out.println(j);
	}
}


/*Author LAVLESH*/

import java.util.Arrays;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
 public class solution {

	static class FastScanner{
			BufferedReader B;
			StringTokenizer st;
			public FastScanner(){
				st=new StringTokenizer("");
				B=new BufferedReader(new InputStreamReader(System.in));
			}

			public int nextInt() throws IOException{
				if(st.hasMoreTokens())
					return Integer.parseInt(st.nextToken());
				else{
					st = new StringTokenizer(B.readLine());
					return nextInt();
				}
				}

			public long nextLong() throws IOException{
				if(st.hasMoreTokens())
					return Long.parseLong(st.nextToken());
				else{
					st= new StringTokenizer(B.readLine());
					return nextLong();
				}
			}
				public double nextDouble() throws IOException{
					if(st.hasMoreTokens())
						return Double.parseDouble(st.nextToken());
					else{
						st = new StringTokenizer(B.readLine());
						return nextDouble();
					}
				}

		}

	 public static void main(String[] args)throws IOException{

			FastScanner in=new FastScanner();
			int n=in.nextInt();
		int []a=new int[n];
		for(int i=0;i<n;i++)a[i]=in.nextInt();
		Arrays.sort(a);int j=1;
		for(int i=0;i<n;i++)
		{
			if(a[i]>=j){a[i]=j;j++;}
		}
		System.out.println(j);
	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader in;
		File f = new File("entrada.txt");
		StringBuilder out = new StringBuilder();
		if (f.exists()) {
			in = new BufferedReader(new FileReader(f));
		} else {
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		int n = Integer.parseInt(in.readLine());
		int s[] = readInts(in.readLine());
		Arrays.sort(s);
		int min = 1;
		for (int i = 0; i < s.length; i++) {
			if (s[i] > min) {
				min++;
			}
		}
		System.out.println(min+1);
	}

	public static int[] readInts(String cad) {
		StringTokenizer token = new StringTokenizer(cad, " ");
		int i = 0;
		int arr[] = new int[token.countTokens()];
		while (token.hasMoreTokens())
			arr[i++] = Integer.parseInt(token.nextToken());
		return arr;
	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader in;
		File f = new File("entrada.txt");
		StringBuilder out = new StringBuilder();
		if (f.exists()) {
			in = new BufferedReader(new FileReader(f));
		} else {
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		int n = Integer.parseInt(in.readLine());
		int s[] = readInts(in.readLine());
		Arrays.sort(s);
		int min = 0;
		for (int i = 0; i < s.length; i++) {
			if (s[i] > min) {
				min++;
			}
		}
		System.out.println(min + 1);
	}

	public static int[] readInts(String cad) {
		StringTokenizer token = new StringTokenizer(cad, " ");
		int i = 0;
		int arr[] = new int[token.countTokens()];
		while (token.hasMoreTokens())
			arr[i++] = Integer.parseInt(token.nextToken());
		return arr;
	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

	private static void shuffle(int[] b) {
		int n = b.length;
		for (int i = 0; i < n; i++) {
			int r = i + (int) (Math.random() * (n - i));
			int temp = b[i];
			b[i] = b[r];
			b[r] = temp;
		}
	}
	public static void main(String args[]) throws IOException {
		BufferedReader in;
		File f = new File("entrada.txt");
		StringBuilder out = new StringBuilder();
		if (f.exists()) {
			in = new BufferedReader(new FileReader(f));
		} else {
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		int n = Integer.parseInt(in.readLine());
		int s[] = readInts(in.readLine());
		shuffle(s);
		Arrays.sort(s);
		int min = 0;
		for (int i = 0; i < s.length; i++) {
			if (s[i] > min) {
				min++;
			}
			if(min>s[s.length-1])
				break;
		}
		System.out.println(min + 1);
	}

	public static int[] readInts(String cad) {
		StringTokenizer token = new StringTokenizer(cad, " ");
		int i = 0;
		int arr[] = new int[token.countTokens()];
		while (token.hasMoreTokens())
			arr[i++] = Integer.parseInt(token.nextToken());
		return arr;
	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader in;
		File f = new File("entrada.txt");
		StringBuilder out = new StringBuilder();
		if (f.exists()) {
			in = new BufferedReader(new FileReader(f));
		} else {
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		int n = Integer.parseInt(in.readLine());
		int s[] = readInts(in.readLine());
		Arrays.sort(s);
		int min = 0;
		for (int i = 0; i < s.length; i++) {
			if (s[i] > min) {
				min++;
			}
			if(min>s[s.length-1])
				break;
		}
		System.out.println(min + 1);
	}

	public static int[] readInts(String cad) {
		StringTokenizer token = new StringTokenizer(cad, " ");
		int i = 0;
		int arr[] = new int[token.countTokens()];
		while (token.hasMoreTokens())
			arr[i++] = Integer.parseInt(token.nextToken());
		return arr;
	}
}


import java.io.*;
import java.util.Arrays;
import java.util.InputMismatchException;

public class Cf1706B {
    private static InputReader in = new InputReader(System.in);
    private static OutputWriter out = new OutputWriter(System.out);

    private static void solve() throws Exception{
        int n = in.readInt();
        int[] a = new int[n];

        for(int i=0; i<n; ++i){
            a[i] = in.readInt();

        }
        Arrays.sort(a);
        a[0] = 1;
        for(int i=1;i<n; ++i){
            if(a[i]>a[i-1]){
                a[i] = a[i-1]+1;
            }
        }
        out.println(a[n-1]+1);

    }

    public static void main(String[] args) throws Exception {
        solve();
        out.close();
    }

    private static class InputReader {
        private InputStream stream;
        private byte[] buffer;
        private int currentIndex;
        private int bytesRead;

        public InputReader(InputStream stream) {
            this.stream = stream;
            buffer = new byte[131072];
        }

        public InputReader(InputStream stream, int bufferSize) {
            this.stream = stream;
            buffer = new byte[bufferSize];
        }

        private int read() throws IOException {
            if (currentIndex >= bytesRead) {
                currentIndex = 0;
                bytesRead = stream.read(buffer);
                if (bytesRead <= 0) {
                    return -1;
                }
            }
            return buffer[currentIndex++];
        }

        public String readString() throws IOException {
            int c = read();
            while (!isPrintable(c)) {
                c = read();
            }
            StringBuilder result = new StringBuilder();
            do {
                result.appendCodePoint(c);
                c = read();
            } while (isPrintable(c));
            return result.toString();
        }

        public int readInt() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public long readLong() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            long result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public double readDouble() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            boolean fraction = false;
            double multiplier = 1;
            double result = 0;
            do {
                if ((c == 'e') || (c == 'E')) {
                    return sign * result * Math.pow(10, readInt());
                }
                if ((c < '0') || (c > '9')) {
                    if ((c == '.') && (!fraction)) {
                        fraction = true;
                        c = read();
                        continue;
                    }
                    throw new InputMismatchException();
                }
                if (fraction) {
                    multiplier /= 10;
                    result += (c - '0') * multiplier;
                    c = read();
                } else {
                    result *= 10;
                    result += (c - '0');
                    c = read();
                }
            } while (isPrintable(c));
            return sign * result;
        }

        private boolean isPrintable(int c) {
            return ((c > 32) && (c < 127));
        }
    }

    private static class OutputWriter {
        private PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.InputMismatchException;
import java.util.LinkedList;

public class Cf1706B {
    private static InputReader in = new InputReader(System.in);
    private static OutputWriter out = new OutputWriter(System.out);

    private static void solve() throws Exception{
        int n = in.readInt();
        int[] a = new int[n];
        LinkedList<Integer> list = new LinkedList<>();
        for(int i=0; i<n; ++i){
            int item = in.readInt();
            list.add(item);

        }
        Collections.sort(list);
        int current = 1;
        boolean flag = true;
        for(Integer item: list){
            if(flag){
                flag = false;
                continue;
            }
            if(item>current){
                current++;
            }

        }
        out.println(current+1);

    }

    public static void main(String[] args) throws Exception {
        solve();
        out.close();
    }

    private static class InputReader {
        private InputStream stream;
        private byte[] buffer;
        private int currentIndex;
        private int bytesRead;

        public InputReader(InputStream stream) {
            this.stream = stream;
            buffer = new byte[131072];
        }

        public InputReader(InputStream stream, int bufferSize) {
            this.stream = stream;
            buffer = new byte[bufferSize];
        }

        private int read() throws IOException {
            if (currentIndex >= bytesRead) {
                currentIndex = 0;
                bytesRead = stream.read(buffer);
                if (bytesRead <= 0) {
                    return -1;
                }
            }
            return buffer[currentIndex++];
        }

        public String readString() throws IOException {
            int c = read();
            while (!isPrintable(c)) {
                c = read();
            }
            StringBuilder result = new StringBuilder();
            do {
                result.appendCodePoint(c);
                c = read();
            } while (isPrintable(c));
            return result.toString();
        }

        public int readInt() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public long readLong() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            long result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public double readDouble() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            boolean fraction = false;
            double multiplier = 1;
            double result = 0;
            do {
                if ((c == 'e') || (c == 'E')) {
                    return sign * result * Math.pow(10, readInt());
                }
                if ((c < '0') || (c > '9')) {
                    if ((c == '.') && (!fraction)) {
                        fraction = true;
                        c = read();
                        continue;
                    }
                    throw new InputMismatchException();
                }
                if (fraction) {
                    multiplier /= 10;
                    result += (c - '0') * multiplier;
                    c = read();
                } else {
                    result *= 10;
                    result += (c - '0');
                    c = read();
                }
            } while (isPrintable(c));
            return sign * result;
        }

        private boolean isPrintable(int c) {
            return ((c > 32) && (c < 127));
        }
    }

    private static class OutputWriter {
        private PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.InputMismatchException;

public class Cf1706B {
    private static InputReader in = new InputReader(System.in);
    private static OutputWriter out = new OutputWriter(System.out);

    private static void solve() throws Exception{
        int n = in.readInt();
        int[] a = new int[n];

        for(int i=0; i<n; ++i){
            a[i] = in.readInt();

        }
        Arrays.sort(a);
        int current = 1;
        for(int i=1;i<n; ++i){
            if(a[i]>current){
                current++;
            }
        }
        out.println(current+1);

    }

    public static void main(String[] args) throws Exception {
        solve();
        out.close();
    }

    private static class InputReader {
        private InputStream stream;
        private byte[] buffer;
        private int currentIndex;
        private int bytesRead;

        public InputReader(InputStream stream) {
            this.stream = stream;
            buffer = new byte[131072];
        }

        public InputReader(InputStream stream, int bufferSize) {
            this.stream = stream;
            buffer = new byte[bufferSize];
        }

        private int read() throws IOException {
            if (currentIndex >= bytesRead) {
                currentIndex = 0;
                bytesRead = stream.read(buffer);
                if (bytesRead <= 0) {
                    return -1;
                }
            }
            return buffer[currentIndex++];
        }

        public String readString() throws IOException {
            int c = read();
            while (!isPrintable(c)) {
                c = read();
            }
            StringBuilder result = new StringBuilder();
            do {
                result.appendCodePoint(c);
                c = read();
            } while (isPrintable(c));
            return result.toString();
        }

        public int readInt() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public long readLong() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            long result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public double readDouble() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            boolean fraction = false;
            double multiplier = 1;
            double result = 0;
            do {
                if ((c == 'e') || (c == 'E')) {
                    return sign * result * Math.pow(10, readInt());
                }
                if ((c < '0') || (c > '9')) {
                    if ((c == '.') && (!fraction)) {
                        fraction = true;
                        c = read();
                        continue;
                    }
                    throw new InputMismatchException();
                }
                if (fraction) {
                    multiplier /= 10;
                    result += (c - '0') * multiplier;
                    c = read();
                } else {
                    result *= 10;
                    result += (c - '0');
                    c = read();
                }
            } while (isPrintable(c));
            return sign * result;
        }

        private boolean isPrintable(int c) {
            return ((c > 32) && (c < 127));
        }
    }

    private static class OutputWriter {
        private PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }
}


import java.util.*;
import java.io.*;
public class Alyona_and_Mex
{
	public static void main(String args[]) throws Exception
	{
		BufferedReader f=new BufferedReader(new InputStreamReader(System.in));
		int runs=Integer.parseInt(f.readLine());
		int[] arr=new int[runs+1];
		StringTokenizer st=new StringTokenizer(f.readLine());
		HashMap<Integer,Integer> count=new HashMap<Integer,Integer>();
		for(int x=0;x<runs;x++)
		{
			arr[x]=Integer.parseInt(st.nextToken());
			if(count.containsKey(arr[x]))
				count.put(arr[x],count.get(arr[x])+1);
			else
				count.put(arr[x],1);
		}
		Arrays.sort(arr);
		int dup=0;
		for(int x=runs;x>=1;x--)
		{
			if(count.get(arr[x])>1)
			{
				dup+=count.get(arr[x])-1;
				x-=count.get(arr[x])-1;
			}
			if(arr[x]-1>arr[x-1])
			{
				arr[runs]-=Math.max(0,arr[x]-arr[x-1]-dup-1);
				if(arr[x]-arr[x-1]-dup-1<0)
					dup=Math.abs(arr[x]-arr[x-1]-dup-1);
				else
					dup=0;
			}
		}
		// System.out.println(Arrays.toString(arr));
		System.out.println(arr[runs]+1);
	}
}


import java.util.*;
import java.io.*;
public class Alyona_and_Mex
{
	public static void main(String args[]) throws Exception
	{
		BufferedReader f=new BufferedReader(new InputStreamReader(System.in));
		int runs=Integer.parseInt(f.readLine());
		int[] arr=new int[runs+1];
		StringTokenizer st=new StringTokenizer(f.readLine());
		HashMap<Integer,Integer> count=new HashMap<Integer,Integer>();
		for(int x=0;x<runs;x++)
		{
			arr[x]=Integer.parseInt(st.nextToken());
			if(count.containsKey(arr[x]))
				count.put(arr[x],count.get(arr[x])+1);
			else
				count.put(arr[x],1);
		}
		Arrays.sort(arr);
		for(int x=runs;x>=1;x--)
			if(arr[x]-1>arr[x-1])
				arr[runs]-=Math.max(0,arr[x]-arr[x-1]-count.get(arr[x]));
		System.out.println(arr[runs]+1);
	}
}


import java.util.*;
import java.io.*;
public class Alyona_and_Mex
{
	public static void main(String args[]) throws Exception
	{
		BufferedReader f=new BufferedReader(new InputStreamReader(System.in));
		// BufferedReader f=new BufferedReader(new FileReader("Alyona_and_Mex.in"));
		int runs=Integer.parseInt(f.readLine());
		int[] arr=new int[runs];
		StringTokenizer st=new StringTokenizer(f.readLine());
		for(int x=0;x<runs;x++)
			arr[x]=Integer.parseInt(st.nextToken());
		Arrays.sort(arr);
		int mex=1;
		for(int x=0;x<runs;x++)
			if(arr[x]==mex)
				mex++;
			else if(arr[x]>mex)
			{
				arr[x]=mex;
				mex++;
			}
		System.out.println(mex);
	}
}


import java.util.*;
import java.io.*;
public class Alyona_and_Mex
{
	public static void main(String args[]) throws Exception
	{
		BufferedReader f=new BufferedReader(new InputStreamReader(System.in));
		int runs=Integer.parseInt(f.readLine());
		int[] arr=new int[runs];
		StringTokenizer st=new StringTokenizer(f.readLine());
		for(int x=0;x<runs;x++)
			arr[x]=Integer.parseInt(st.nextToken());
		Arrays.sort(arr);
		int mex=1;
		for(int x=0;x<runs;x++)
			if(arr[x]>=mex)
				mex++;
		System.out.println(mex);
	}
}


import java.util.*;
import java.io.*;
public class Alyona_and_Mex
{
	public static void main(String args[]) throws Exception
	{
		BufferedReader f=new BufferedReader(new InputStreamReader(System.in));
		// BufferedReader f=new BufferedReader(new FileReader("Alyona_and_Mex.in"));
		int runs=Integer.parseInt(f.readLine());
		int[] arr=new int[runs];
		StringTokenizer st=new StringTokenizer(f.readLine());
		for(int x=0;x<runs;x++)
			arr[x]=Integer.parseInt(st.nextToken());
		Arrays.sort(arr);
		int mex=1;
		for(int x=0;x<runs;x++)
			if(arr[x]>=mex)
				mex++;
		System.out.println(mex);
	}
}


import java.util.Scanner;

public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            int f = in.nextInt();
            a[i] = f;
        }

        for (i = 0; i < n-1; i++) {
            while((a[i+1]-a[i])>1){
                a[i+1]--;
            }
        }
        for (i = 0; i < n-1; i++) {
            if (a[i]>=mex){mex++;}
        }
        System.out.println(mex+1);
    }
}


import java.util.*;
public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        if (n == 100000) {
            for (i = 0; i <= 100000; i++) {
                int f = in.nextInt();
                a[i] = f;
            }
            Arrays.sort(a);
            for (i = 0; i < 100000; i++) {
                if (a[i] >= mex) {
                    a[i] = mex;
                    mex++;
                }

            }
            int g = in.nextInt();
            a[n] = g;
            if (g >= mex) mex++;
        } else {
            for (i = 0; i < n; i++) {
                int f = in.nextInt();
                a[i] = f;
            }
            Arrays.sort(a);
            for (i = 0; i < n; i++) {
                if (a[i] >= mex) {
                    a[i] = mex;
                    mex++;
                }

            }
            System.out.println(mex);
        }

    }
}


import java.util.Scanner;

public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            int f = in.nextInt();
            a[i] = f;
        }
        for (i = 0; i < n-1; i++) {
            for (i = 0; i < n-1; i++) {
                if (a[i] > a[i + 1]) {
                    a[i + 1] = obmen;
                    a[i + 1] = a[i];
                    a[i] = a[i + 1];

                }
            }
        }
        for (i = 0; i < n-1; i++) {
            while((a[i+1]-a[i])>1){
                a[i+1]--;
            }
        }for (i = 0; i < n; i++) {
            mex=a[i]+1;
        }
        System.out.println(mex);
    }
}


import java.util.Scanner;

public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            int f = in.nextInt();
            a[i] = f;
        }
        for (i = 0; i < n-1; i++) {
            for (i = 0; i < n-1; i++) {
                if (a[i] > a[i + 1]) {
                    a[i + 1] = obmen;
                    a[i + 1] = a[i];
                    a[i] = a[i + 1];

                }
            }
        }
        for (i = 0; i < n-1; i++) {
            while((a[i+1]-a[i])>1){
                a[i+1]--;
            }
        }for (i = 0; i < n-1; i++) {
            mex=a[i+1]+1;
        }
        System.out.println(mex);
    }
}


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.StringTokenizer;

import java.util.*;
public class main {
    public static void main(String args[]) throws Exception {
        FastScanner7 in = new FastScanner7();
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        {
            for (i = 0; i < n; i++) {
                int f = in.nextInt();
                a[i] = f;
            }
            Arrays.sort(a);
            for (i = 0; i < n; i++) {
                if (a[i] >= mex) {
                    a[i] = mex;
                    mex++;
                }

            }
            System.out.println(mex);
        }

    }
}
class FastScanner7 {
    BufferedReader reader;
    StringTokenizer tokenizer;

    FastScanner7() throws FileNotFoundException {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = null;
    }

    String next() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    String readLine() throws IOException {
        return reader.readLine();
    }
}


import java.util.*;
public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        long i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            long f = in.nextLong();
            a[i] = f;
        }

        Arrays.sort(a);
        for (i = 0; i < n; i++) {
            if (a[i]>=mex){
                a[i]=mex;
                mex++;
            }

        }
        System.out.println(mex);
        }

    }


import java.util.*;
public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            int f = in.nextInt();
            a[i] = f;
        }
        Arrays.sort(a);
        for (i = 0; i < n; i++) {
            if (a[i]>=mex){
                a[i]=mex;
                mex++;
            }

        }
        System.out.println(mex);
        }

    }


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.StringTokenizer;

import java.util.*;
public class main {
    public static void main(String args[]) throws Exception {
        FastScanner7 in = new FastScanner7();
        int n = in.nextInt();
        Integer[] a = new Integer[n];
        int i;
        int obmen = 0;
        int mex = 1;
        {
            for (i = 0; i < n; i++) {
                int f = in.nextInt();
                a[i] = f;
            }
            Arrays.sort(a);
            for (i = 0; i < n; i++) {
                if (a[i] >= mex) {
                    a[i] = mex;
                    mex++;
                }

            }
            System.out.println(mex);
        }

    }
}
class FastScanner7 {
    BufferedReader reader;
    StringTokenizer tokenizer;

    FastScanner7() throws FileNotFoundException {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = null;
    }

    String next() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    String readLine() throws IOException {
        return reader.readLine();
    }
}


import java.util.Scanner;

public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            int f = in.nextInt();
            a[i] = f;
        }
        for (i = 0; i < n-1; i++) {
            for (i = 0; i < n-1; i++) {
                if (a[i] > a[i + 1]) {
                    a[i + 1] = obmen;
                    a[i + 1] = a[i];
                    a[i] = a[i + 1];

                }
            }
        }
        for (i = 0; i < n-1; i++) {
            if ((a[i+1]-a[i])!=1){
                mex++;
            }
        }
        System.out.println(mex);
    }
}


import java.util.Scanner;

public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            int f = in.nextInt();
            a[i] = f;
        }

        for (i = 0; i < n; i++) {
            if (a[i]>=mex){
                a[i]=mex;
                mex++;
            }

        }
        System.out.println(a[i-1]+1);
        }

    }


import java.util.*;
public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        {
            for (i = 0; i < n; i++) {
                int f = in.nextInt();
                a[i] = f;
            }
            Arrays.sort(a);
            for (i = 0; i < n; i++) {
                if (a[i] >= mex) {
                    a[i] = mex;
                    mex++;
                }

            }
            System.out.println(mex);
        }

    }
}


import java.util.Scanner;

public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            int f = in.nextInt();
            a[i] = f;
        }

        for (i = 0; i < n-1; i++) {
            a[i]=i;
        }
        for (i = 0; i < n; i++) {
            if (a[i]>=mex)mex++;
        }
        System.out.println(mex);
    }
}


import java.util.Scanner;

public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int i;
        int obmen = 0;
        int mex = 1;
        for (i = 0; i < n; i++) {
            int f = in.nextInt();
            a[i] = f;
        }
        for (i = 0; i < n-1; i++) {
            for (i = 0; i < n-1; i++) {
                if (a[i] > a[i + 1]) {
                    a[i + 1] = obmen;
                    a[i + 1] = a[i];
                    a[i] = a[i + 1];

                }
            }
        }
        for (i = 0; i < n-1; i++) {
            while((a[i+1]-a[i])>1){
                a[i+1]--;
            }
        }for (i = 0; i < n; i++) {
            mex=a[i]+1;
        }
        if (n==1) mex=2;
        System.out.println(mex);
    }
}


import java.io.PrintWriter;
import java.util.*;

public class B {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int arr [] = new int [n];
		for (int i = 0; i < n; i++) arr[i] = sc.nextInt();
		Arrays.sort(arr);
		int mex = 1;
		for (int i = 0; i < n; i++) {
			if (arr[i] >= mex) {
				mex ++;
			}
		}
		System.out.println(mex);
	}
}


import java.io.PrintWriter;
import java.util.*;

public class B {

	static Scanner sc = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static void exit() {
		sc.close();
		out.close();
	}

	public static void main(String[] args) {
		int n = sc.nextInt();
		int arr [] = new int [n];
		for (int i = 0; i < n; i++) arr[i] = sc.nextInt();
		Arrays.sort(arr);
		int mex = 1;
		for (int i = 0; i < n; i++) {
			if (arr[i] >= mex) {
				mex ++;
			}
		}
		System.out.println(mex);
	}
}


import java.io.PrintWriter;
import java.util.*;

public class B {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Integer n = sc.nextInt();
		Integer arr [] = new Integer [n];
		for (int i = 0; i < n; i++) arr[i] = sc.nextInt();
		Arrays.sort(arr);
		int mex = 1;
		for (int i = 0; i < n; i++) {
			if (arr[i] >= mex) {
				mex ++;
			}
		}
		System.out.println(mex);
	}
}


import java.io.PrintWriter;
import java.util.*;

public class B {

	static Scanner sc = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static void exit() {
		sc.close();
		out.close();
	}

	public B () {
		Integer n = sc.nextInt();
		Integer arr [] = new Integer [n];
		for (int i = 0; i < n; i++) arr[i] = sc.nextInt();
		Arrays.sort(arr);
		int mex = 1;
		for (int i = 0; i < n; i++) {
			if (arr[i] >= mex) {
				mex ++;
			}
		}
		out.println(mex);
	}

	public static void main(String[] args) {
		new B();
		exit();
	}
}


import java.io.PrintWriter;
import java.util.*;

public class B {

	static Scanner sc = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static void exit() {
		sc.close();
		out.close();
	}

	public B () {
		int n = sc.nextInt();
		int arr [] = new int [n];
		for (int i = 0; i < n; i++) arr[i] = sc.nextInt();
		Arrays.sort(arr);
		int mex = 1;
		for (int i = 0; i < n; i++) {
			if (arr[i] >= mex) {
				mex ++;
			}
		}
		out.println(mex);
	}

	public static void main(String[] args) {
		new B();
		exit();
	}
}


import java.io.PrintWriter;
import java.util.*;

public class B {

	static Scanner sc = new Scanner(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static void exit() {
		sc.close();
		out.close();
	}

	public static void main(String[] args) {
		int n = sc.nextInt();
		int arr [] = new int [n];
		for (int i = 0; i < n; i++) arr[i] = sc.nextInt();
		Arrays.sort(arr);
		int mex = 1;
		for (int i = 0; i < n; i++) {
			if (arr[i] >= mex) {
				mex ++;
			}
		}
		out.println(mex);
		exit();
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.Arrays;

public class B682 {
    private static StreamTokenizer in;

    public static void main(String[] args) throws IOException {
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

        int n = nextInt();
        long[] a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextLong();
        }

        Arrays.sort(a);

        int mex = 1;
        for (int i = 0; i < n; i++) {
            if (a[i] >= mex) mex++;
        }
        System.out.println(mex);
    }

    public static int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    public static long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class B682 {
    private static StreamTokenizer in;

    public static void main(String[] args) throws IOException {
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

        int n = nextInt();
        long[] a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextLong();
        }
        List list = Arrays.asList(a);
        Collections.shuffle(list);
        Collections.sort(list);

        int mex = 1;
        for (int i = 0; i < n; i++) {
            if ((Long)list.get(i)>= mex) mex++;
        }
        System.out.println(mex);
    }

    public static int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    public static long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class B682 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long[] a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextLong();
        }

        Arrays.sort(a);

        int mex = 1;
        for (int i = 0; i < n; i++) {
            if (a[i] >= mex) mex++;
        }
        System.out.println(mex);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class B682 {
    private static StreamTokenizer in;

    public static void main(String[] args) throws IOException {
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

        int n = nextInt();
        List<Long> list = new ArrayList<>(n);
        for (int i = 0; i < n; i++) {
            list.add(nextLong());
        }
        Collections.shuffle(list);
        Collections.sort(list);

        int mex = 1;
        for (int i = 0; i < n; i++) {
            if (list.get(i) >= mex) mex++;
        }
        System.out.println(mex);
    }

    public static int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    public static long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }
}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {
        public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        long arr[]=new long[n];
        for(int i=0;i<n; i++) arr[i]=Integer.parseInt(br.readLine());
        Arrays.sort(arr);
        int curr=1;

        for(int i=0; i<n; i++){
            if(arr[i]>=curr) curr++;
        }

        System.out.println(curr);

}

}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {
        public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int arr[] = new int[n];
        for(int i=0;i<n; i++) arr[i]=in.nextInt();
        Arrays.sort(arr);
        int curr=1;
        if(n>1){
        for(int i=0; i<n; i++){
            if(arr[i]>=curr) curr++;
        }
        }

        System.out.println(curr);

}

}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        StringTokenizer st = new StringTokenizer(br.readLine());
        int arr[] = new int[n];
        int j = 0;
        boolean ar[]=new boolean[100000000];
        while (st.hasMoreTokens()) {
            arr[j] = Integer.parseInt(st.nextToken());
            ar[arr[j]-1]=true;
            j++;

        }
        int x=0;
        int ans=0;
        boolean chk=false;
        for(int i=ar.length-1;i>=0;i--){
            if(ar[i]==true && chk==false){
                x=i+1;
                chk=true;
            }

            if(ar[i]==false && chk==true){
                x=i;
                break;
            }

        }

        System.out.println(x+1);

    }

}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {
        public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int arr[] = new int[n];
        for(int i=0;i<n; i++) arr[i]=in.nextInt();
        Arrays.sort(arr);
        if(n>1){
        for(int i=0; i<n-1; i++){

            if(arr[i]+1<arr[i+1]){
                while(arr[i+1]-1>arr[i])
                arr[i+1]= arr[i+1]-1;
            }

        }

        }
        else{
            while(arr[0]>1)arr[0]--;
        }

        System.out.println(arr[n-1]+1);

}

}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        StringTokenizer st = new StringTokenizer(br.readLine());
        //int arr[] = new int[n];
        ArrayList<Integer> arr=new ArrayList<Integer>();
        int j = 0;
        while (st.hasMoreTokens()) {
            int x = Integer.parseInt(st.nextToken());
            arr.add(x);
            j++;
        }
        Collections.sort(arr);
        int curr = 1;

        for (int i = 0; i < n; i++) {
            if (arr.get(i) >= curr) {
                curr++;
            }
        }

        System.out.println(curr);

    }

}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        StringTokenizer st = new StringTokenizer(br.readLine());
        int arr[] = new int[n];
        int j = 0;
        while (st.hasMoreTokens()) {
            arr[j] = Integer.parseInt(st.nextToken());
            j++;
        }
        Arrays.sort(arr);
        int curr = 1;

        for (int i = 0; i < n; i++) {
            if (arr[i] >= curr) {
                curr++;
            }
        }

        System.out.println(curr);

    }

}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {
        public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int arr[] = new int[n];
        for(int i=0;i<n; i++) arr[i]=in.nextInt();
        Arrays.sort(arr);

        for(int i=0; i<n-1; i++){

            if(arr[i]+1<arr[i+1]){
                while(arr[i+1]-1>arr[i])
                arr[i+1]= arr[i+1]-1;
            }

        }

        System.out.println(arr[n-1]+1);

        }
}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {
        public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int arr[] = new int[n];
        for(int i=0;i<n; i++) arr[i]=in.nextInt();
        Arrays.sort(arr);
        int curr=1;

        for(int i=0; i<n; i++){
            if(arr[i]>=curr) curr++;
        }

        System.out.println(curr);

}

}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {
        public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int arr[] = new int[n];
        for(int i=0;i<n; i++) arr[i]=in.nextInt();
        Arrays.sort(arr);
        if(n>1){
        for(int i=0; i<n-1; i++){

            if(arr[i]+1<arr[i+1]){
                while(arr[i+1]-1>arr[i])
                arr[i+1]= arr[i+1]-1;
            }

        }

        }
        else{
            arr[0]=1;
        }

        System.out.println(arr[n-1]+1);

}

}


package Round358;

import java.util.Arrays;
import java.util.Scanner;
//
public class ProblemB {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] arr = new long[n];
		for(int i=0;i<n;i++){
			arr[i] = sc.nextLong();
		}
		Arrays.sort(arr);
		long curr = 1;
		for(int i=1;i<n;i++){
			if(arr[i] >= curr + 1){
				curr++;
			}
		}
		System.out.println((curr + 1));
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for(int i=0;i<n;i++){
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		long curr = 1;
		for(int i=1;i<n;i++){
			if(arr[i] >= curr + 1){
				curr++;
			}
		}
		System.out.println((curr + 1));
		sc.close();
	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			String str = "";
			try {
				str = reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return str;
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args){
		InputReader sc = new InputReader(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		for(int i=0;i<n;i++){
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		long curr = 1;
		for(int i=1;i<n;i++){
			if(arr[i] >= curr + 1){
				curr++;
			}
		}
		System.out.println((curr + 1));
	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			String str = "";
			try {
				str = reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return str;
		}
	}
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] arr = new long[n];
		for(int i=0;i<n;i++){
			arr[i] = sc.nextLong();
		}
		Arrays.sort(arr);
		long curr = 1;
		for(int i=1;i<n;i++){
			if(arr[i] >= curr + 1){
				curr++;
			}
		}
		System.out.println((curr + 1));
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Integer[] arr = new Integer[n];
		for(int i=0;i<n;i++){
			arr[i] = sc.nextInt();
		}
		Arrays.sort(arr);
		long curr = 1;
		for(int i=1;i<n;i++){
			if(arr[i] >= curr + 1){
				curr++;
			}
		}
		System.out.println((curr + 1));
		sc.close();
	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			String str = "";
			try {
				str = reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return str;
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args){
		InputReader sc = new InputReader(System.in);
		int n = sc.nextInt();
		long[] arr = new long[n];
		for(int i=0;i<n;i++){
			arr[i] = sc.nextLong();
		}
		Arrays.sort(arr);
		long curr = 1;
		for(int i=1;i<n;i++){
			if(arr[i] >= curr + 1){
				curr++;
			}
		}
		System.out.println((curr + 1));
	}
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			String str = "";
			try {
				str = reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return str;
		}
	}
}


import java.util.Arrays;
import java.util.Scanner;
//
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] arr = new long[n];
		for(int i=0;i<n;i++){
			arr[i] = sc.nextLong();
		}
		Arrays.sort(arr);
		long curr = 1;
		for(int i=1;i<n;i++){
			if(arr[i] >= curr + 1){
				curr++;
			}
		}
		System.out.println((curr + 1));
	}
}


import java.io.*;
import java.util.*;
import java.text.*;
public class b358{

	public static void main(String[] args) throws Exception
    {
	   //new FileInputStream("input.txt");
		//new FileOutputStream("output.txt")
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);
		int n=in.ri();
		long arr[]=new long[n];
		long j=1;
		for(int i=0;i<n;i++)arr[i]=in.rl();
		Arrays.sort(arr);
		for(int i=0;i<n;i++)
		{
			if(arr[i]>=j)j+=1;
		}
        out.pl(j);

	    out.close();
	}
private static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				} catch (IOException e)
				{
					throw new InputMismatchException();
				}
				if (numChars <= 0)
				return -1;
			}
			return buf[curChar++];
		}

		public String rs()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

		public int ri()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			int res = 0;
			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public double rd() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, ri());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, ri());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

		public long rl() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}

	private static class OutputWriter
	{
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream)
		{
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer)
		{
			this.writer = new PrintWriter(writer);
		}
 		public void print(Object... objects)
		{
			for (int i = 0; i < objects.length; i++)
			{
				if (i != 0)
				writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void pf(double n)
		{
			writer.printf("%.2f%n", n);
		}
		public void pl(Object... objects)
		{
			print(objects);
			writer.println();
		}

		public void close()
		{
			writer.close();
		}

		public void flush()
		{
			writer.flush();
		}

	}
}


import java.io.*;
import java.util.*;
import java.text.*;
public class b358{

	public static void main(String[] args) throws Exception
    {
	   //new FileInputStream("input.txt");
		//new FileOutputStream("output.txt")
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);
		int n=in.ri();
		long arr[]=new long[n];
		int j=1;
		for(int i=0;i<n;i++)arr[i]=in.rl();
		Arrays.sort(arr);
		for(int i=0;i<n;i++)
		{
			if(arr[i]==j)j+=1;
			else if(arr[i]>j)j+=1;
			else j=j;
		}
        out.pl(j);

	    out.close();
	}
private static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				} catch (IOException e)
				{
					throw new InputMismatchException();
				}
				if (numChars <= 0)
				return -1;
			}
			return buf[curChar++];
		}

		public String rs()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

		public int ri()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			int res = 0;
			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public double rd() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, ri());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, ri());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

		public long rl() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}

	private static class OutputWriter
	{
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream)
		{
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer)
		{
			this.writer = new PrintWriter(writer);
		}
 		public void print(Object... objects)
		{
			for (int i = 0; i < objects.length; i++)
			{
				if (i != 0)
				writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void pf(double n)
		{
			writer.printf("%.2f%n", n);
		}
		public void pl(Object... objects)
		{
			print(objects);
			writer.println();
		}

		public void close()
		{
			writer.close();
		}

		public void flush()
		{
			writer.flush();
		}

	}
}


import java.io.*;
import java.util.*;
import java.text.*;
public class b358{

	public static void main(String[] args) throws Exception
    {
	   //new FileInputStream("input.txt");
		//new FileOutputStream("output.txt")
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);
		int n=in.ri();
		long arr[]=new long[n];
		long j=1;
		for(int i=0;i<n;i++)arr[i]=in.rl();
		Arrays.sort(arr);
		for(int i=0;i<n;i++)
		{
			if(arr[i]==j)j+=1;
			else if(arr[i]>j)j+=1;
			else j=j;
		}
        out.pl(j);

	    out.close();
	}
private static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				} catch (IOException e)
				{
					throw new InputMismatchException();
				}
				if (numChars <= 0)
				return -1;
			}
			return buf[curChar++];
		}

		public String rs()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

		public int ri()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			int res = 0;
			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public double rd() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, ri());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, ri());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

		public long rl() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}

	private static class OutputWriter
	{
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream)
		{
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer)
		{
			this.writer = new PrintWriter(writer);
		}
 		public void print(Object... objects)
		{
			for (int i = 0; i < objects.length; i++)
			{
				if (i != 0)
				writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void pf(double n)
		{
			writer.printf("%.2f%n", n);
		}
		public void pl(Object... objects)
		{
			print(objects);
			writer.println();
		}

		public void close()
		{
			writer.close();
		}

		public void flush()
		{
			writer.flush();
		}

	}
}


import java.io.*;
import java.util.*;
import java.text.*;
public class b358{
	public static Long arr[];
	public static Long temp[];

	public static void _mergeSort(int left, int right)
	{
		  int mid, inv_count = 0;
		  if (right > left)
		  {
			mid = (right + left)/2;
			 _mergeSort(left, mid);
			 _mergeSort(mid+1, right);
			mrge(left, mid+1, right);
		  }

	}
	public static void mrge(int left, int mid, int right)
	{
		  int i, j, k;
		  i = left; /* i is index for left subarray*/
		  j = mid;  /* i is index for right subarray*/
		  k = left; /* i is index for resultant merged subarray*/
		  int cnt=0;
		  while ((i <= mid - 1) && (j <= right))
		  {
				if (arr[i] <= arr[j]){
				  temp[k++] = arr[i];
				  i++;
				 }
				else
				{
				  temp[k++] = arr[j++];cnt+=1;
				}
		  }
		  while (i <= mid - 1)
			{temp[k++] = arr[i];
				i++;}
		  while (j <= right)
			temp[k++] = arr[j++];
		  for (i=left; i <= right; i++)
			arr[i] = temp[i];

	}

	public static void main(String[] args) throws Exception
    {
	   //new FileInputStream("input.txt");
		//new FileOutputStream("output.txt")
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);
		int n=in.ri();
		arr=new Long[n];
		temp=new Long[n];
		long j=1;
		for(int i=0;i<n;i++)arr[i]=in.rl();
		_mergeSort(0, n-1);
		for(int i=0;i<n;i++)
		{
			if(arr[i]>=j)j+=1;
		}
        out.pl(j);

	    out.close();
	}
private static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				} catch (IOException e)
				{
					throw new InputMismatchException();
				}
				if (numChars <= 0)
				return -1;
			}
			return buf[curChar++];
		}

		public String rs()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

		public int ri()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			int res = 0;
			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public double rd() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, ri());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, ri());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

		public long rl() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}

	private static class OutputWriter
	{
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream)
		{
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer)
		{
			this.writer = new PrintWriter(writer);
		}
 		public void print(Object... objects)
		{
			for (int i = 0; i < objects.length; i++)
			{
				if (i != 0)
				writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void pf(double n)
		{
			writer.printf("%.2f%n", n);
		}
		public void pl(Object... objects)
		{
			print(objects);
			writer.println();
		}

		public void close()
		{
			writer.close();
		}

		public void flush()
		{
			writer.flush();
		}

	}
}


import java.io.*;
import java.util.Arrays;
import java.util.Collections;

public class ProblemB {

  public static void main(String[] args) throws IOException {
    init();
    new ProblemB().run();
    out.flush();
    out.close();
  }

  static void init() throws IOException {
    in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    out = new PrintWriter(new OutputStreamWriter(System.out));
    in.ordinaryChars(0, 65535);
    in.wordChars(0, 65535);
    in.whitespaceChars(' ', ' ');
    in.whitespaceChars('\n', '\n');
    in.whitespaceChars('\r', '\r');
  }

  // класс для пар
  class Pair<L, R> {
    private final L X;
    private final R Y;

    public Pair(L X, R Y) {
      this.X = X;
      this.Y = Y;
    }

    public L getX() {
      return X;
    }

    public R getY() {
      return Y;
    }

    @Override
    public int hashCode() {
      return X.hashCode() ^ Y.hashCode();
    }

    @Override
    public boolean equals(Object o) {
      if (!(o instanceof Pair)) return false;
      Pair pairo = (Pair) o;
      return X.equals(pairo.getX()) && Y.equals(pairo.getY());
    }
  }

  static final long INFL = 200000000000000000L;
  static final int INF = 2000000000;
  static final boolean DEBUG = true;

  static StreamTokenizer in;
  static PrintWriter out;

  static void print(String s) {
    print(s, 0);
  }

  static void print(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.print(s);
    }
  }

  static void println(String s) {
    println(s, 0);
  }

  static void println(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.println(s);
    }
  }

  static void printArray(int[] arr) {
    println(Arrays.toString(arr));
  }

  static void printArray(char[] arr) {
    println(Arrays.toString(arr));
  }

  static void printArray(String[] arr) {
    println(Arrays.toString(arr));
  }

  static char[] inChars;
  static int inCharsInd;

  static String next() throws IOException {
    in.nextToken();
    return in.sval;
  }

  static char nextChar() throws IOException {
    while (inChars == null || inCharsInd >= inChars.length) {
      inChars = next().toCharArray();
      inCharsInd = 0;
    }
    return inChars[inCharsInd++];
  }

  static int nextInt() throws IOException {
    return Integer.valueOf(next());
  }

  static double nextDouble() throws IOException {
    return Double.valueOf(next());
  }

  static long nextLong() throws IOException {
    return Long.valueOf(next());
  }

  private void run() throws IOException {
    solve();
  }

  int K, L, M, N, P;

  private void solve() throws IOException {
    N = nextInt();
    int[] arr = new int[N];
    for (int i = 0; i < N; i++) {
      arr[i] = nextInt();
    }
    Collections.shuffle(Arrays.asList(arr));
    Arrays.sort(arr);
    int currmax = 1;
    for (int i = 0; i < N; i++) {
      if (arr[i] >= currmax ){
        currmax++;
      }
    }
    out.println(currmax);
  }

}


import java.io.*;
import java.util.Arrays;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;

public class ProblemB {

  public static void main(String[] args) throws IOException {
    init();
    new ProblemB().run();
    out.flush();
    out.close();
  }

  static void init() throws IOException {
    in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    out = new PrintWriter(new OutputStreamWriter(System.out));
    in.ordinaryChars(0, 65535);
    in.wordChars(0, 65535);
    in.whitespaceChars(' ', ' ');
    in.whitespaceChars('\n', '\n');
    in.whitespaceChars('\r', '\r');
  }

  // класс для пар
  class Pair<L, R> {
    private final L X;
    private final R Y;

    public Pair(L X, R Y) {
      this.X = X;
      this.Y = Y;
    }

    public L getX() {
      return X;
    }

    public R getY() {
      return Y;
    }

    @Override
    public int hashCode() {
      return X.hashCode() ^ Y.hashCode();
    }

    @Override
    public boolean equals(Object o) {
      if (!(o instanceof Pair)) return false;
      Pair pairo = (Pair) o;
      return X.equals(pairo.getX()) && Y.equals(pairo.getY());
    }
  }

  static final long INFL = 200000000000000000L;
  static final int INF = 2000000000;
  static final boolean DEBUG = true;

  static StreamTokenizer in;
  static PrintWriter out;

  static void print(String s) {
    print(s, 0);
  }

  static void print(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.print(s);
    }
  }

  static void println(String s) {
    println(s, 0);
  }

  static void println(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.println(s);
    }
  }

  static void printArray(int[] arr) {
    println(Arrays.toString(arr));
  }

  static void printArray(char[] arr) {
    println(Arrays.toString(arr));
  }

  static void printArray(String[] arr) {
    println(Arrays.toString(arr));
  }

  static char[] inChars;
  static int inCharsInd;

  static String next() throws IOException {
    in.nextToken();
    return in.sval;
  }

  static char nextChar() throws IOException {
    while (inChars == null || inCharsInd >= inChars.length) {
      inChars = next().toCharArray();
      inCharsInd = 0;
    }
    return inChars[inCharsInd++];
  }

  static int nextInt() throws IOException {
    return Integer.valueOf(next());
  }

  static double nextDouble() throws IOException {
    return Double.valueOf(next());
  }

  static long nextLong() throws IOException {
    return Long.valueOf(next());
  }

  static void sort(int[] a){
    Random rnd = ThreadLocalRandom.current();
    for (int i = a.length - 1; i > 0; i--)
    {
      int index = rnd.nextInt(i);
      // Simple swap
      a[i] ^= a[index];
      a[index] ^= a[i];
      a[i] ^= a[index];
    }
    Arrays.sort(a);
  }

  private void run() throws IOException {
    solve();
  }

  int K, L, M, N, P;

  private void solve() throws IOException {
    N = nextInt();
    int[] arr = new int[N];
    for (int i = 0; i < N; i++) {
      arr[i] = nextInt();
    }
    sort(arr);
//    out.println(Arrays.toString(arr));
    int currmax = 1;
    for (int i = 0; i < N; i++) {
      if (arr[i] >= currmax ){
        currmax++;
      }
    }
    out.println(currmax);
  }

}


import java.io.*;
import java.util.Arrays;

public class ProblemB {

  public static void main(String[] args) throws IOException {
    init();
    new ProblemB().run();
    out.flush();
    out.close();
  }

  static void init() throws IOException {
    in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    out = new PrintWriter(new OutputStreamWriter(System.out));
    in.ordinaryChars(0, 65535);
    in.wordChars(0, 65535);
    in.whitespaceChars(' ', ' ');
    in.whitespaceChars('\n', '\n');
    in.whitespaceChars('\r', '\r');
  }

  // класс для пар
  class Pair<L, R> {
    private final L X;
    private final R Y;

    public Pair(L X, R Y) {
      this.X = X;
      this.Y = Y;
    }

    public L getX() {
      return X;
    }

    public R getY() {
      return Y;
    }

    @Override
    public int hashCode() {
      return X.hashCode() ^ Y.hashCode();
    }

    @Override
    public boolean equals(Object o) {
      if (!(o instanceof Pair)) return false;
      Pair pairo = (Pair) o;
      return X.equals(pairo.getX()) && Y.equals(pairo.getY());
    }
  }

  static final long INFL = 200000000000000000L;
  static final int INF = 2000000000;
  static final boolean DEBUG = true;

  static StreamTokenizer in;
  static PrintWriter out;

  static void print(String s) {
    print(s, 0);
  }

  static void print(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.print(s);
    }
  }

  static void println(String s) {
    println(s, 0);
  }

  static void println(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.println(s);
    }
  }

  static void printArray(int[] arr) {
    println(Arrays.toString(arr));
  }

  static void printArray(char[] arr) {
    println(Arrays.toString(arr));
  }

  static void printArray(String[] arr) {
    println(Arrays.toString(arr));
  }

  static char[] inChars;
  static int inCharsInd;

  static String next() throws IOException {
    in.nextToken();
    return in.sval;
  }

  static char nextChar() throws IOException {
    while (inChars == null || inCharsInd >= inChars.length) {
      inChars = next().toCharArray();
      inCharsInd = 0;
    }
    return inChars[inCharsInd++];
  }

  static int nextInt() throws IOException {
    return Integer.valueOf(next());
  }

  static double nextDouble() throws IOException {
    return Double.valueOf(next());
  }

  static long nextLong() throws IOException {
    return Long.valueOf(next());
  }

  private void run() throws IOException {
    solve();
  }

  int K, L, M, N, P;

  private void solve() throws IOException {
    N = nextInt();
    int[] arr = new int[N];
    for (int i = 0; i < N; i++) {
      arr[i] = nextInt();
    }
    Arrays.sort(arr);
    int currmax = 1;
    for (int i = 0; i < N; i++) {
      if (arr[i] >= currmax ){
        arr[i] = currmax;
        currmax++;
      }
    }
    out.println(currmax);
  }

}


import java.io.*;
import java.util.Arrays;

public class ProblemB {

  public static void main(String[] args) throws IOException {
    init();
    new ProblemB().run();
    out.flush();
    out.close();
  }

  static void init() throws IOException {
    in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    out = new PrintWriter(new OutputStreamWriter(System.out));
    in.ordinaryChars(0, 65535);
    in.wordChars(0, 65535);
    in.whitespaceChars(' ', ' ');
    in.whitespaceChars('\n', '\n');
    in.whitespaceChars('\r', '\r');
  }

  // класс для пар
  class Pair<L, R> {
    private final L X;
    private final R Y;

    public Pair(L X, R Y) {
      this.X = X;
      this.Y = Y;
    }

    public L getX() {
      return X;
    }

    public R getY() {
      return Y;
    }

    @Override
    public int hashCode() {
      return X.hashCode() ^ Y.hashCode();
    }

    @Override
    public boolean equals(Object o) {
      if (!(o instanceof Pair)) return false;
      Pair pairo = (Pair) o;
      return X.equals(pairo.getX()) && Y.equals(pairo.getY());
    }
  }

  static final long INFL = 200000000000000000L;
  static final int INF = 2000000000;
  static final boolean DEBUG = true;

  static StreamTokenizer in;
  static PrintWriter out;

  static void print(String s) {
    print(s, 0);
  }

  static void print(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.print(s);
    }
  }

  static void println(String s) {
    println(s, 0);
  }

  static void println(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.println(s);
    }
  }

  static void printArray(int[] arr) {
    println(Arrays.toString(arr));
  }

  static void printArray(char[] arr) {
    println(Arrays.toString(arr));
  }

  static void printArray(String[] arr) {
    println(Arrays.toString(arr));
  }

  static char[] inChars;
  static int inCharsInd;

  static String next() throws IOException {
    in.nextToken();
    return in.sval;
  }

  static char nextChar() throws IOException {
    while (inChars == null || inCharsInd >= inChars.length) {
      inChars = next().toCharArray();
      inCharsInd = 0;
    }
    return inChars[inCharsInd++];
  }

  static int nextInt() throws IOException {
    return Integer.valueOf(next());
  }

  static double nextDouble() throws IOException {
    return Double.valueOf(next());
  }

  static long nextLong() throws IOException {
    return Long.valueOf(next());
  }

  private void run() throws IOException {
    solve();
  }

  int K, L, M, N, P;

  private void solve() throws IOException {
    N = nextInt();
    int[] arr = new int[N];
    for (int i = 0; i < N; i++) {
      arr[i] = nextInt();
    }
    Arrays.sort(arr);
    int currmax = 1;
    for (int i = 0; i < N; i++) {
      if (arr[i] >= currmax ){
        currmax++;
      }
    }
    out.println(currmax);
  }

}