#include <fstream>
#include <algorithm>
#include <vector>

using namespace std;

ifstream input("Bai3_16.inp");
ofstream output("Bai3_16.out");
int n;
int res = 0;

int main()
{
	input >> n;
	vector <int> a(n);
	for (int i = 0; i < n; ++i)
	{
		input >> a[i];
	}
	sort(a.begin(), a.end());
	for (int i = 0; i < a.size() - 1; ++i)
	{
		if (a[i] == a[i + 1])
		{
			a.erase(a.begin() + i);
			--i;
		}
	}
	for (int i = 0; i < a.size(); ++i)
	{
		if (a[i] != i + 1)
		{
			res = i + 1;
			break;
		}
	}
	if (res == 0)
	{
		res = a.size() + 1;
	}
	output << res;
	input.close();
	output.close();
	return 0;
}