#include <bits/stdc++.h>
using namespace std;
bool arr[3001];
int main() {
  int n, i, input;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> input;
    arr[input] = true;
  }
  for (i = 1; i <= 3000; i++) {
    if (!arr[i]) {
      cout << i << endl;
      return 0;
    }
  }
  cout << 3001 << endl;
  return 0;
}
