#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int n;
vector<int> v;
void work() {
int i;
int total = 0;
if(v[0] != 1){
printf("1\n"); return;
}
else {
total = v[0];
for(i = 1; i < n; i++ ) {
if(v[i] <= total + 1) {
total += v[i];
} else {
printf("%d\n", total+1);
return;
}
}
}
printf("%d\n", total+1);
}
int main()
{
int i, tmp;
while(scanf("%d", &n) != EOF) {
v.clear();
for(i = 0; i < n; i++) {
scanf("%d", &tmp);
v.push_back(tmp);
}
sort(v.begin(), v.end());
work();
}
return 0;
}