#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    vector<int> a(n);
    for (int i = 0; i < n; scanf("%d", &a[i++]))
      ;
    sort(a.begin(), a.end());
    bool ok = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] != i + 1) {
        cout << i + 1 << endl;
        ok = 1;
        break;
      }
    }
    if (!ok) cout << n + 1 << endl;
  }
  return 0;
}
