#include <bits/stdc++.h>
using namespace std;
struct Solution {
  int N, M;
  set<int> A;
  void Solve() {
    scanf("%d", &N);
    for (int i = 0; i < N; ++i) {
      scanf("%d", &M);
      A.insert(M);
    }
    int answer = 1;
    while (A.count(answer)) ++answer;
    printf("%d\n", answer);
  }
};
int main() {
  Solution().Solve();
  return 0;
}
