import java.util.Arrays;
import java.util.Scanner;
public class P2437 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), arr[] = new int[n], answer = 1;
for (int i = 0; i < n; i++) arr[i] = sc.nextInt();
Arrays.sort(arr);
for (int i = 0; i < arr.length; i++) {
if (answer < arr[i])
break;
answer += arr[i];
}
System.out.println(answer);
sc.close();
}
}