// Arup Guha
// 2/15/2024
// Solution to 2013 NCPC Problem: Planting Trees (to illustrate a greedy algorithm)

import java.util.*;

public class trees {

	public static void main(String[] args) {
	
		// Read in values.
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		ArrayList<Integer> vals = new ArrayList<Integer>();		
		for (int i=0; i<n; i++) 
			vals.add(stdin.nextInt());
			
		// Sort from most to least.
		Collections.sort(vals, Collections.reverseOrder());
		
		// Take the maximum time of all the tree maturing times.
		int res = 0;
		for (int i=0; i<n; i++)
			res = Math.max(res, vals.get(i) + i + 2);
		System.out.println(res);
	}
}