#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  int t[n];
  for (int i = 0; i < n; i++) {
    cin >> t[i];
  }
  sort(t, t + n);
  bool b = true;
  int j = 0;
  if (t[0] > 1) {
    cout << 1;
  } else {
    while ((b == true) && (j < n)) {
      if (t[j + 1] == t[j] + 1) {
        j++;
      } else {
        b = false;
      }
    }
    cout << t[j] + 1;
  }
  return 0;
}
