#include <bits/stdc++.h>
using namespace std;
map<int, int> nn;
set<int> x;
int n, arr[100100];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    nn[arr[i]]++;
    x.insert(arr[i]);
  }
  for (int i = 1; i <= n + 1; i++) {
    if (nn[i] == 0) {
      if (x.upper_bound(i) == x.end()) {
        cout << i << endl;
        return 0;
      }
      nn[i]++;
      nn[*x.upper_bound(i)]--;
      if (nn[*x.upper_bound(i)] == 0) {
        x.erase(x.upper_bound(i));
      }
    }
  }
  return 0;
}
