// Arup Guha
// 2/15/2024
// Solution to Kattis Problem: Planting Trees
// Used to illustrate a greedy algorithm.
import java.util.*;

public class trees {

	public static void main(String[] args) {
	
		// Read in the number of values.
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		ArrayList<Integer> vals = new ArrayList<Integer>();
		
		// Read numbers.
		for (int i=0; i<n; i++) 
			vals.add(stdin.nextInt());
			
		// Sort in reverse order.
		Collections.sort(vals, Collections.reverseOrder());
		
		// See when each tree is ready and take the largest of the values.
		int res = 0;
		for (int i=0; i<n; i++)
			res = Math.max(res, vals.get(i) + i + 2);
		System.out.println(res);
	}
}