#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  cin >> n;
  int a[n];
  int b[n + 2];
  for (i = 1; i <= n + 1; i++) {
    b[i] = 0;
  }
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < (n + 1)) {
      b[a[i]] = 1;
    }
  }
  for (i = 1; i <= n; i++) {
    if (b[i] == 0) {
      cout << i << endl;
      return 0;
    }
  }
  cout << n + 1 << endl;
  return 0;
}
