#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  unordered_map<int, int> mp;
  long long int a[n];
  long long int maxsofar = INT_MIN;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]] = 1;
    maxsofar = max(maxsofar, a[i]);
  }
  for (int i = 1; i <= maxsofar; i++) {
    auto it = mp.find(i);
    if (it == mp.end()) {
      cout << i << endl;
      return 0;
    }
  }
  cout << maxsofar + 1 << endl;
}
