#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  if (v[0] == 1) {
    for (int i = 0; i < v.size() - 1; i++) {
      if (v[i + 1] > (v[i] + 1)) {
        cout << (v[i] + 1);
        return 0;
      }
    }
    cout << (v[v.size() - 1] + 1);
  } else
    cout << "1";
}
